Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

During text edit, delete key tries to both delete selected text and any selected item in Object Explorer #7683

Closed
paultobey opened this issue Jul 12, 2024 · 6 comments
Assignees
Milestone

Comments

@paultobey
Copy link

Describe the bug

In Windows (I have not tested on other OSes), when I'm editing query text, pressing the Del key to delete the currently selected text or to delete the next character in the text editor also attempts to delete the selected object in Object Explorer, generating an are-you-sure dialog (and a lot of frustration ;-)

To Reproduce

Open a database, select a table. Open query editor. Select some text in the query or place the cursor where the Del key makes sense for text editing. Press Del. The text editor operation occurs, but you also get an are-your-sure error about deleting the selected table.

Expected behavior

When the text editor uses a key, it should not pass it up the chain to other potential consumers like Object Explorer. It should just do the text editing operation.

Screenshots

State before pressing Del key. Note that I most-recently selected the text in the query editor, NOT the table in the Object Explorer so this isn't an issue of what is focused.

pgAdmin 1

State after pressing Del key.

pgAdmin 2

State after dismissing are-your-sure with No. Note that the Del operation did the right thing in the query editor.

pgAdmin 3

Desktop (please complete the following information):

  • OS: Windows 10, but I've also seen it in Windows Server 2022
  • Version: 8.9, 8.8, 8.7...
  • Mode: Desktop
@paultobey paultobey added the Bug label Jul 12, 2024
@paultobey
Copy link
Author

I'll also note that using the Find or Replace dialog in the query editor also has the same problem: entering some search or replacement text then Del also asks if you want to delete the table.

@adityatoshniwal
Copy link
Contributor

Hi @paultobey,

Check your shortcuts in preferences. Possibly overlapping.
image

@paultobey
Copy link
Author

Hi @paultobey,

Check your shortcuts in preferences. Possibly overlapping. image

@adityatoshniwal Agreed. If I wanted to alter keyboard shortcuts I could work-around it. However, it seems reasonable to delete from Object Explorer when that control is focused and from the text editor when that is focused. For example, if we have two query editors open, we don't apply the Del key to both of them. I guess it feels like this should be the same case.

@adityatoshniwal
Copy link
Contributor

@adityatoshniwal Agreed. If I wanted to alter keyboard shortcuts I could work-around it. However, it seems reasonable to delete from Object Explorer when that control is focused and from the text editor when that is focused. For example, if we have two query editors open, we don't apply the Del key to both of them. I guess it feels like this should be the same case.

I agree. Consider it as a workaround while we fix the issue.

@akshay-joshi akshay-joshi moved this to 🆕 New in Current Sprint (184) Jul 17, 2024
@RohitBhati8269 RohitBhati8269 self-assigned this Jul 18, 2024
@RohitBhati8269 RohitBhati8269 moved this from 🆕 New to 🏗 In Progress in Current Sprint (184) Jul 18, 2024
RohitBhati8269 pushed a commit to RohitBhati8269/pgadmin4 that referenced this issue Jul 22, 2024
… table.

Resolved delete object(shortcut key) affecting both text and Object Explorer items.pgadmin-org#7683
RohitBhati8269 added a commit to RohitBhati8269/pgadmin4 that referenced this issue Jul 22, 2024
@RohitBhati8269 RohitBhati8269 moved this from 🏗 In Progress to In Review in Current Sprint (184) Jul 22, 2024
@adityatoshniwal adityatoshniwal moved this from In Review to In Testing in Current Sprint (184) Jul 24, 2024
@adityatoshniwal adityatoshniwal moved this from In Testing to 🏗 In Progress in Current Sprint (184) Jul 24, 2024
@RohitBhati8269 RohitBhati8269 moved this from 🏗 In Progress to In Review in Current Sprint (184) Jul 30, 2024
akshay-joshi pushed a commit that referenced this issue Jul 31, 2024
@akshay-joshi akshay-joshi moved this from In Review to In Testing in Current Sprint (184) Jul 31, 2024
@akshay-joshi akshay-joshi added this to the 8.11 milestone Jul 31, 2024
RohitBhati8269 added a commit to RohitBhati8269/pgadmin4 that referenced this issue Jul 31, 2024
@paultobey
Copy link
Author

Much better in 8.10! Thanks!

@pravesh-sharma pravesh-sharma self-assigned this Aug 7, 2024
@pravesh-sharma
Copy link
Contributor

Issue fixed. Verified on snapshot build .

Env:
OS - macOS 14.5 (Sonoma)
Mode - Desktop

@pravesh-sharma pravesh-sharma moved this from In Testing to ✅ Done in Current Sprint (184) Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants