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

Modal dialogs don't return focus to canvas which disables keyboard shortcuts. #1

Open
roger-frybarger opened this issue Jan 8, 2018 · 0 comments

Comments

@roger-frybarger
Copy link
Owner

commented Jan 8, 2018

This is an issue I found while doing some testing today. It seams that whenever one of the modal dialogs is opened and then closed it does not automatically return the focus to the main drawing canvas. This means that any keyboard input is ignored until the focus is returned to something that is listening for keyboard input. Thus, if the user had enabled keyboard shortcuts, opening & then closing any of the modal dialogs will seem to disable those keyboard shortcuts. The fix should be pretty straight forward. We just need to put an onclick attribute within the close button of each modal dialog that focuses the main canvas. That way, when the close button is clicked, (either by the user or via JavaScript), it closes the dialog and focuses the main canvas, enabling the keyboard input to go to an element where it is being listened to.
The line of code needed should be as simple as:
onclick="document.getElementById('canvas1').focus();"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.