Bug 30397
Summary: | Meta + key should not fire keypress event | ||
---|---|---|---|
Product: | WebKit | Reporter: | Erik Arvidsson <arv> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | a_protyasha, ap, asevilla, karlcow, masayuki, tony, webkit-bug-importer, wenson_hsieh |
Priority: | P2 | Keywords: | BrowserCompat, InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | OS X 10.5 | ||
URL: | https://whsieh.github.io/examples/key-events | ||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=185971 https://bugs.webkit.org/show_bug.cgi?id=16972 https://bugs.webkit.org/show_bug.cgi?id=28409 https://bugs.webkit.org/show_bug.cgi?id=199475 https://bugs.webkit.org/show_bug.cgi?id=208088 https://bugs.webkit.org/show_bug.cgi?id=32746 |
Erik Arvidsson
The general rule is that key(s) should only fire keypress events if they generate content. Also, we are trying to match IE which dos not fire keypress events for ctrl + key (we should still fire repeating keydown events)
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Tony Chang
(In reply to comment #0)
> The general rule is that key(s) should only fire keypress events if they
> generate content. Also, we are trying to match IE which dos not fire keypress
> events for ctrl + key (we should still fire repeating keydown events)
By meta, do you mean command on mac and the Windows key on win/linux? Or do you mean the alt/option key on mac?
Using the test case on bug 28409 https://bug-28409-attachments.webkit.org/attachment.cgi?id=34993 , in Safari 4.0.4 on mac, I see a keypress fired in all cases (ctrl, alt, or command). On Chrome on mac, I see a keypress fired for only ctrl and alt (no keypress event for command).
Is this bug Safari specific?
Karl Dubost
from https://www.w3.org/TR/uievents/#keypress:
> If supported by a user agent, this event MUST be dispatched when a key is pressed down, if and only if that key normally produces a character value. The keypress event type is device dependent and relies on the capabilities of the input devices and how they are mapped in the operating system.
Radar WebKit Bug Importer
<rdar://problem/121181035>
Arvin Sevilla
*** Bug 208088 has been marked as a duplicate of this bug. ***
Abrar Rahman Protyasha
(In reply to Karl Dubost from comment #2)
> from https://www.w3.org/TR/uievents/#keypress:
>
> > If supported by a user agent, this event MUST be dispatched when a key is pressed down, if and only if that key normally produces a character value. The keypress event type is device dependent and relies on the capabilities of the input devices and how they are mapped in the operating system.
"that key normally produces a character value" is a little vague because the `keypress` events are fired for, say, `V`, and not `⌘`, when a user types `⌘V` to paste something. At any rate, it seems OK for us to align our behavior with the other browser engines here and _not_ dispatch `keypress` if there is a modifier active.
Abrar Rahman Protyasha
*** Bug 185971 has been marked as a duplicate of this bug. ***