fix(contextual-menu): allow Escape key to close menu inside modal (#1…#1315
fix(contextual-menu): allow Escape key to close menu inside modal (#1…#1315NamanMehta16 wants to merge 1 commit intocanonical:mainfrom
Conversation
|
NamanMehta16 is not a collaborator of the repo |
edlerd
left a comment
There was a problem hiding this comment.
Thanks for the contribution, one clarifying question below.
4a9623a to
fe63a04
Compare
edlerd
left a comment
There was a problem hiding this comment.
Code LGTM.
The comments are a bit confusing. Maybe remove or rephrase to communicate better the reason for the code below them.
| // Ensure portal is closed when isOpen becomes false, | ||
| // even if keydown handler is not reached |
There was a problem hiding this comment.
| // Ensure portal is closed when isOpen becomes false, | |
| // even if keydown handler is not reached |
I don't understand how the comment relates to the code below.
| } | ||
| }; | ||
|
|
||
| // capture phase helps when modal stops propagation |
There was a problem hiding this comment.
| // capture phase helps when modal stops propagation |
Not sure what this is supposed to mean. It seems confusing to me.
There was a problem hiding this comment.
Thanks for the review and feedback. I have addressed the lint errors and refined the comments to better explain the changes. Happy to make any further updates if needed.
|
Thanks for the update. This looks mostly good to merge. Just some thoughts on the comments above and some linter failures below. Please take a look. |
fe63a04 to
41718b3
Compare
41718b3 to
4da0607
Compare
|
Thanks for the update and sorry for the confusion. The |
|
I believe the ticket #1305 is still valid (its reproduction steps still demonstrate contextual menus inside modals not closing when ESC is pressed, even with |
Yes, that is a bug in the modal component, not the contextual menu. See my comment over there. |
…305)
Done
QA
Pinging @canonical/react-library-maintainers for a review.
Storybook
To see rendered examples of all react-components, run:
QA in your project
from
react-componentsrun:Install the resulting tarball in your project with:
QA steps
Percy steps
Fixes
Fixes: # .