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

Menu shortcuts should be disabled while a dialog is open #5235

Open
2 tasks done
ErikKalkoken opened this issue Nov 3, 2024 · 1 comment
Open
2 tasks done

Menu shortcuts should be disabled while a dialog is open #5235

ErikKalkoken opened this issue Nov 3, 2024 · 1 comment

Comments

@ErikKalkoken
Copy link
Contributor

Checklist

  • I have searched the issue tracker for open issues that relate to the same feature, before opening a new one.
  • This issue only relates to a single feature. I will open new issues for any other features.

Is your feature request related to a problem?

In a desktop app with a menu the menu shortcuts are still active while a dialog is open. This can be a problem, because if there are shortcut that opens a dialog (e.g. a settings dialog), this allows the user to open multiple instances of the same dialog, one on top of each other. It may also be weird for users to be able to open menu items through shortcuts while a supposedly modal dialog is open. In general this behavior breaks the expectation of modality for dialogs in desktop apps.

Is it possible to construct a solution with the existing API?

As a workaround one could manually remove all menu shortcuts before a dialog is open and re-add them again when it is closed. This would have to be done for each and every dialog in the app and would result in a lot of additional boilerplate code.

Describe the solution you'd like to see.

Menu shortcuts should be automatically disabled when a dialog opens and re-enabled when it is closed. Any other shortcuts should not be affected.

@ErikKalkoken
Copy link
Contributor Author

For reference our related discussion on Discord

@ErikKalkoken ErikKalkoken changed the title Shortcuts should be disabled while a dialog is open Menu shortcuts should be disabled while a dialog is open Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant