Open Bug 1912495 Opened 1 year ago Updated 5 months ago

Enter/Escape key `keyup` events leak from spellcheck/alert modals into active element (textarea)

Categories

(Core :: Spelling checker, defect, P3)

Firefox 130
defect

Tracking

()

UNCONFIRMED

People

(Reporter: myf, Unassigned)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0

Steps to reproduce:

Using enter key to apply spell check suggestion from context menu fires keyup event in focused element. Try attached MRE.

  • Open (spellcheck) context menu on any typo and confirm first suggestion using Enter key in any element listening to keyup event.

Actual results:

  • (Enter) Keyup event from the modal is registered in the textarea (In the MRE alert is shown). Furthermore closing the alert with Enter key also produces another alert.

Expected results:

  • Textarea should not have any notion about keyboard activity neither from the context menu, nor from the alert dialogue.

I am running into this glitch several times a week: namely every time I am fixing a typo in a comment on Stack Overflow this mistakenly submits it unfinished.

The Bugbug bot thinks this bug should belong to the 'Core::Spelling checker' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Spelling checker
Product: Firefox → Core

... and maybe more importantly, Escape key leaks from the context menu as well. (Does not leak from alert, luckily.)
So chances are dismissing the context menu with Escape key could trigger some "cancel" command in the page too. (I even think I have encountered it in the past, but cannot recall concrete web-app.

Summary: Enter key keyup event leaks from modal dialog (spellcheck, alert) into active element (textarea) → Enter an Escape keys keyup events leak from spellcheck context menu/alert modal into active element (textarea)
Severity: -- → S3
Priority: -- → P3
Summary: Enter an Escape keys keyup events leak from spellcheck context menu/alert modal into active element (textarea) → Enter/Escape key `keyup` events leak from spellcheck/alert modals into active element (textarea)

Can we get this at least confirmed? Are STRs clear? (Or does setting priority implicate it does not have to be confirmed at all?)

Reiterating the real-world impact of this issue, I mentioned earlier: Every single time I use spellchecker to correct a typo while writing comment on Stack Overflow, this very issue actually prematurely triggers its submission, what is a bit stressing, since there is just very short time window for edit before it is sealed a publishing half-written comments is super awkward, as you may imagine. The fact I know about this problem there doesn't help at all, since correcting typos with keyboard is a muscle memory matter and is sadly always faster than recalling I rather should use a mouse this time, or fix it manually like a caveman.

This seems to be related or a duplicate of bug 771411 and possibly bug 452376.

Yup, I guess you are correct, good catch! Strange I wasn't able to find them back when creating this.
I'd likely close this here then (who could possibly give any attention to this pitifully young report here, right?), and copy the testcases to the second-to-oldest (when the oldest 17 years old one is closed, clearly by a mistake, despite your 10 years old test case there still works as a new. Unbelievable!). And will look into making proper screen video captures, perhaps? And, and, … make some viral shorts about this? … spread it on forums? …"tell HN"? …or maybe some targetted viral marketing? …register some domain for this bug? Riots over Mozilla HQ? What could possibly help here?

Anyway, thanks for looking into this, David. Happy to see there actually are people who cared even long before me!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: