fix(material/menu): not interrupting keyboard events to other overlays#22928
Merged
Conversation
Member
Author
|
Caretaker note: the previous PR had to be reverted due to an issue in g3. If resolving the issue is difficult, I can try to limit the scope of these changes only to escape key presses. |
andrewseguin
approved these changes
Jun 11, 2021
This is a resubmit of angular#22856 which had some issues in g3. For historical reasons, `mat-menu` doesn't use the same keyboard event dispatcher as the other overlays. To work around it, previously we added a dummy subscription so that the menu would still show up in the overlay keyboard stack. This works for most events, but it breaks down for the escape key, because closing the menu removes it from the stack immediately, allowing the event to bubble up to the document and be dispatched to the next overlay in the stack. These changes resolve the issue by adding a stopPropagation call. Fixes angular#22694.
zarend
pushed a commit
that referenced
this pull request
Jul 30, 2021
#22928) This is a resubmit of #22856 which had some issues in g3. For historical reasons, `mat-menu` doesn't use the same keyboard event dispatcher as the other overlays. To work around it, previously we added a dummy subscription so that the menu would still show up in the overlay keyboard stack. This works for most events, but it breaks down for the escape key, because closing the menu removes it from the stack immediately, allowing the event to bubble up to the document and be dispatched to the next overlay in the stack. These changes resolve the issue by adding a stopPropagation call. Fixes #22694. (cherry picked from commit 5f529db)
zarend
pushed a commit
that referenced
this pull request
Jul 30, 2021
#22928) This is a resubmit of #22856 which had some issues in g3. For historical reasons, `mat-menu` doesn't use the same keyboard event dispatcher as the other overlays. To work around it, previously we added a dummy subscription so that the menu would still show up in the overlay keyboard stack. This works for most events, but it breaks down for the escape key, because closing the menu removes it from the stack immediately, allowing the event to bubble up to the document and be dispatched to the next overlay in the stack. These changes resolve the issue by adding a stopPropagation call. Fixes #22694. (cherry picked from commit 5f529db)
zarend
added a commit
to zarend/components
that referenced
this pull request
Aug 4, 2021
… overlays (angular#22928)" This reverts commit 5f529db.
zarend
added a commit
that referenced
this pull request
Aug 4, 2021
zarend
added a commit
that referenced
this pull request
Aug 4, 2021
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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 is a resubmit of #22856 which had some issues in g3.
For historical reasons,
mat-menudoesn't use the same keyboard event dispatcher as the other overlays. To work around it, previously we added a dummy subscription so that the menu would still show up in the overlay keyboard stack.This works for most events, but it breaks down for the escape key, because closing the menu removes it from the stack immediately, allowing the event to bubble up to the document and be dispatched to the next overlay in the stack.
These changes resolve the issue by adding a stopPropagation call.
Fixes #22694.