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

Open Beginner friendly
#10,272 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
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:

  1. Connect to a database and open the query tool
  2. Drag and drop some script file from windows explorer
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.