Bug 185971 - E.g., Ctrl + A shouldn't fire keypress event
Summary: E.g., Ctrl + A shouldn't fire keypress event
Status: RESOLVED DUPLICATE of bug 30397
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 11
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: https://w3c.github.io/uievents/tools/...
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2018-05-24 19:58 PDT by Masayuki Nakano
Modified: 2024-02-08 15:32 PST (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Masayuki Nakano 2018-05-24 19:58:14 PDT
1. Go to https://w3c.github.io/uievents/tools/key-event-viewer.html
2. Move focus to the <input>
3. Type control + A
4. Type control + option + A
5. Check the "Read only" checkbox
6. Type control + A
7. Type control + option + A

Expected Result:
At #3, #4, #6, #7, keypress events won't be fired since keypress events should be fired "f and only if that key normally produces a character value".
https://www.w3.org/TR/uievents/#event-type-keypress

Actual Result:
#3 does not fire keypress event (as expected)
#4 fires keypress event whose charCode is 1 (invalid)
#6 fires keypress event whose charCode is 1 (invalid)
#7 fires keypress event whose charCode is 1 (invalid)

Firefox will stop dispatching those keypress events.

Chromium also has same bug.

And I found bug 28409 which requests to dispatch keypress events for such non-printable key combinations, but this is clearly invalid for the latest UI Events.
Comment 1 Lucas Forschler 2019-02-06 09:19:16 PST
Mass move bugs into the DOM component.
Comment 2 Ryosuke Niwa 2019-02-06 21:02:47 PST
This belongs in UI events.
Comment 3 Radar WebKit Bug Importer 2024-02-08 15:17:56 PST
<rdar://problem/122586679>
Comment 4 Abrar Rahman Protyasha 2024-02-08 15:32:47 PST
This is the same root cause as https://bugs.webkit.org/show_bug.cgi?id=30397, which has some prior discussion. Duping.

*** This bug has been marked as a duplicate of bug 30397 ***