Problem/Motivation
Currently, when a Modal window is open, I am unable to close ME modal windows using the "escape" key on my keyboard. Modal windows that are not ME related work as intended. This is just related to ME.
Steps to reproduce
This can be tested by using your keyboard.
Go to any content that uses ME. Add a new section, and once the modal is open, hit escape. Nothing happens but the modal should disappear and focus should be brought to what triggered the open modal.
Proposed resolution
Pressing the "escape" key on my keyboard should close any open ME modal and bring the focus back to what triggered the modal.
| Comment | File | Size | Author |
|---|---|---|---|
| Screenshot 2023-12-18 at 3.43.17 PM.png | 25.27 KB | michaelablackham |
Comments
Comment #2
justin2pin commentedComment #3
justin2pin commentedTest / review against https://git.drupalcode.org/project/mercury_editor/-/merge_requests/34
Comment #4
michaelablackham commentedI currently hit "escape" and the modal disappears. However, I am brought back to the top of the page and not to the element that triggered the action.
The ideal functionality is to close the window and return the :focus back to the link or button that triggered the action. that way a user can continue on their tab journey without starting over.
This same action should happen when you hit the "X" (close) icon as well. Currently they both bring focus back to the top of the page.
Screencast showing me hitting "escape" and focus is brought back to top and you next tab shows "skip to main content" https://share.cleanshot.com/G7KfmR27
Comment #5
justin2pin commentedShould be fixed in commit 1922132f of https://git.drupalcode.org/project/mercury_editor/-/merge_requests/34
Comment #6
michaelablackham commentedThis is working as it should and can be merged in
Comment #7
justin2pin commented