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

Ctrl+W shortcut on dialogs sometimes doesn't work #9826

Closed
ruggi99 opened this issue May 19, 2020 · 3 comments · Fixed by #9857
Closed

Ctrl+W shortcut on dialogs sometimes doesn't work #9826

ruggi99 opened this issue May 19, 2020 · 3 comments · Fixed by #9857
Labels
bug Confirmed bugs or reports that are very likely to be bugs priority-3 Bugs that affect small number of users and/or relatively cosmetic in nature windows Issues specific Desktop usage on Windows

Comments

@ruggi99
Copy link
Contributor

ruggi99 commented May 19, 2020

Describe the bug

Depending on where you click on the dialog, Ctrl+W shortcut may not work.

Version & OS

Version: 2.5.0
OS: Windows 10

Steps to reproduce the behavior

  1. Open Clone Repo dialog
  2. Click on the header "Clone a repository" (or other areas that are not interactive)
  3. Trigger shortcut Ctrl+W

Expected behavior

Dialog closes.

Actual behavior

Nothing happens.

Screenshots

Logs

Logs not helpful in my opinion.

Additional context

The problem is that when you press on the header (or other areas..), focus is put on body (you can see with document.activeElement) and so onKeyDown listener (of the dialog element) is not triggered.
My idea is to put tabIndex={-1} to the dialog element. So, when header is pressed, focus is put on dialog element and onKeyDown listener is triggered correctly.
I Think that addressing this issue can make #3629 and #5911 easily fixable

@ruggi99 ruggi99 changed the title Shortcuts on dialogs sometimes don't work Ctrl+W shortcut on dialogs sometimes doesn't work May 19, 2020
@tierninho tierninho added bug Confirmed bugs or reports that are very likely to be bugs priority-3 Bugs that affect small number of users and/or relatively cosmetic in nature windows Issues specific Desktop usage on Windows labels May 19, 2020
@tierninho
Copy link
Contributor

@ruggi99 Good catch, thanks! Confirming this can reproduced and is a Windows-only bug.

@ruggi99
Copy link
Contributor Author

ruggi99 commented May 19, 2020

@tierninho thank you.
Is the solution resolving the bug? Can I open PR for that?

@tierninho
Copy link
Contributor

tierninho commented May 19, 2020

Opening a PR should be okay 👍 , but let's allow this issue to sit for one day (before starting on the PR) so others have a chance to weigh in. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs priority-3 Bugs that affect small number of users and/or relatively cosmetic in nature windows Issues specific Desktop usage on Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@tierninho @ruggi99 and others