Bug: Unable to close modal using keyboard ("Esc") or clicking modal overlay

Noticed a bug when replying to a thread:

Reply to a post > add text > click Close > Attempt to escape modal by clicking “Escape” > Try to escape by clicking the modal overlay > Then click on the header of the modal and click “escape” and notice focus surround header. Next, scroll on the background using your mouse or up/down arrow. I would expect the modal background to be frozen and not interactive.

My expectation is that when a user clicks the overlay or hits escape, the modal closes and focus returns to the expected element depending on the user’s selection (e.g., keep editing returns to textbox, discard would return you to top of page or create topic, etc.)… right now if you click keep editing focus just :magic_wand: disappears

The image shows a screenshot of a web browser window with a white text box at the top and code in the background. (Captioned by AI)

Console has a ton of errors as well.

Thanks!!!

2 Likes

Good catch, should be fixed by A11Y: Allow dismissing the discard drafts modal via keyboard by pmusaraj · Pull Request #29802 · discourse/discourse · GitHub

3 Likes

This topic was automatically closed after 2 days. New replies are no longer allowed.