This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Fix keyboard event handling for stacked modal dialogs#3785
Merged
Conversation
added 2 commits
May 10, 2013 13:06
… keydownHandlers, only the top-most of which are enabled.
There was a problem hiding this comment.
I think we need to do this (and the call to KeyBindingManager.setEnabled(false) below) only if we're at the outermost level of the stack.
|
Done with review. Overall, CURSE YOU FOR COMING UP WITH A MORE ELEGANT FIX THAN MINE. I'll get the hang of closures one of these days... |
… the "stack", even if it isn't on top, and also only fiddling with the KeyBindingManager when there is a single open dialog.
Contributor
Author
|
Comments addressed?
|
|
Great! Merging. |
njx
pushed a commit
that referenced
this pull request
May 14, 2013
Fix keyboard event handling for stacked modal dialogs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull attempts to fix keyboard event handling in case multiple modal dialogs are shown at once by maintaining a stack of key-down handler functions that corresponds to the stack of dialogs, and enabling only the handler for the top dialog. Escape-key dismissal is also now handled explicitly in the key-down handler.
Lightly tested with the Extension Manager -> Install Extension dialog stack .
This pull addresses issue #3505 and supersedes pull #3522.