pgadmin-org / pgadmin-org/pgadmin4
Drag-n-drop file to sql editor tool don't clear previous content before adding the new content in windows
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 891
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 8
Description
Please note that security bugs or issues should be reported to security@pgadmin.org.
Describe the bug
When drag a file from windows explorer and drop in the query tool the content of the file is merged with
the previous content in the query tool
To Reproduce
Steps to reproduce the behavior:
- Connect to a database and open the query tool
- Drag and drop some script file from windows explorer
- Drag and drop another script file from windows explorer
The new content is mixed with the old in the query tool
Expected behavior
The content be all replaced by the content of the new file dropped
Desktop (please complete the following information):
Client:
- OS: Windows 11
- Browser : Edge, chrome
Server:
- pgAdmin version: 9.17
- Mode: Server Mode
- Package type: RPM (server: Rocky Linux 10.2)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the query tool entry point that handles drag-and-drop files from Windows Explorer, and reproduce the behavior by dropping two script files in sequence. The fix is done when the second file replaces the first rather than being appended or merged, with the behavior verified in Edge or Chrome on Windows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100