- From: sideshowbarker <notifications@github.com>
- Date: Fri, 24 Jan 2025 02:25:10 -0800
- To: w3c/uievents <uievents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/uievents/pull/392@github.com>
For web compat and for interop with actual behavior in browsers, this change updates the spec to require firing `keypress` events for the <kbd>Enter</kbd> key and for the combination of the <kbd>Enter</kbd> key with the <kbd>Shift</kbd> or <kbd>Ctrl</kbd> keys.
Otherwise, without this change, the spec is restricting implementations to requirements for `keypress` that are different from what browsers need to implement in order to be compatible with existing web content.
As an example of a specific case where conforming to the current spec causes unexpected behavior:
Without this change, Ladybird — which has strictly implemented the spec as currently written — doesn’t work as expected when trying to send messages in the The Lounge • https://thelounge.chat/ web-based IRC client.
And in troubleshooting that problem, I noticed that The Lounge is a Vue-based app — so, out of curiosity, I did a search at https://github.com/search?q=%22%40keypress.enter%22+language%3AVue&type=code&l=Vue and found that there’s a whole lotta other Vue code out there in the wild that’s doing stuff with `@keypress.enter`.
Closes #183, and closes #266.
The following tasks have been completed:
* [ ] Confirmed there are no ReSpec/BikeShed errors or warnings.
_[There are existing errors; this change doesn’t introduce any new ones]_
* [ ] Modified Web platform tests (link to pull request)
_[I’m not aware of any WPT tests for this…]_
Implementation commitment:
* [x] WebKit _[already implements this]_
* [x] Chromium _[already implements this]_
* [x] Gecko _[already implements this]_
* [x] Ladybird: https://github.com/LadybirdBrowser/ladybird/pull/3353
You can view, comment on, or merge this pull request online at:
https://github.com/w3c/uievents/pull/392
-- Commit Summary --
* Fire keypress event for Enter, Shift+Enter, and Ctrl+Enter keys
-- File Changes --
M sections/legacy-event-types.txt (15)
-- Patch Links --
https://github.com/w3c/uievents/pull/392.patch
https://github.com/w3c/uievents/pull/392.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/pull/392
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/uievents/pull/392@github.com>
Received on Friday, 24 January 2025 10:25:13 UTC