Closed
Bug 246409
Opened 20 years ago
Closed 5 years ago
NS_KEY_PRESS events should always have a keyCode
Categories
(Core :: DOM: Events, defect, P5)
Tracking
()
RESOLVED
DUPLICATE
of bug 1479964
People
(Reporter: ilya.konstantinov+future, Unassigned)
References
Details
(Whiteboard: [WONTFIX?])
Attachments
(2 files, 1 obsolete file)
199 bytes,
text/html
|
Details | |
4.40 KB,
patch
|
Details | Diff | Splinter Review |
Currently, we don't set the keyCode for keypress events which have a charCode.
This was done to solve bug 13447, but no longer seems required (I reversed the
fix, and Delete/Backspace keys work as usual).
Solving this bug would improve also improve our IE compatibility. (Our
proprietary KeyEvent object is modeled on IE's.)
Reporter | ||
Comment 1•20 years ago
|
||
Reporter | ||
Updated•20 years ago
|
Attachment #150565 -
Flags: superreview?(jst)
Attachment #150565 -
Flags: review?(bryner)
It's also modeled off of
http://www.w3.org/TR/1999/WD-DOM-Level-2-19990923/events.html#Events-eventgroupings-keyevents
(which was removed in the next draft).
Reporter | ||
Comment 3•20 years ago
|
||
Reporter | ||
Comment 4•20 years ago
|
||
gtk and gtk2 patches were tested by me.
windows patch was tested by jst.
macos patch is a "blind patch"; a mac developer should test it.
Assignee: general → mozilla-bugzilla
Attachment #150565 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Reporter | ||
Updated•20 years ago
|
Attachment #150565 -
Flags: superreview?(jst)
Attachment #150565 -
Flags: review?(bryner)
Comment 5•20 years ago
|
||
Hmm, I can't believe I didn't notice this the first time I tested windows
version of this diff, but this change makes the '.' key not work as expected in
input fields. If you apply this diff, start Firefox and start typing in the URL
bar, no '.'s show up when you hit the '.' key. And if you position the cursor in
the middle of some existing text, hittin the '.' key acts as if you've hit the
'Del' key! Any thoughts?
Reporter | ||
Comment 6•20 years ago
|
||
Also, this patch causes regression described by bug 250198 (on gtk2). I wonder
why things are so sensitive to having keypresses without keyCode.
Comment 7•20 years ago
|
||
*** Bug 270612 has been marked as a duplicate of this bug. ***
Comment 8•18 years ago
|
||
I think this might confuse existing scripts on some sites, so I'm leaning
towards INVALID/WONTFIX. As mentioned in comment 2, DOM2 Events at one
point required both keyCode and charCode for all keyup/down/press events,
but the whole section on keyboard events were later removed.
http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-keyevents
Looking at "DOM Level 3 Events Specification" there is no "keypress" event,
it seems to have been replaced by a "textInput" event and none of the events have keyCode/charCode, instead there is "keyIdentifier", "keyLocation"
http://www.w3.org/TR/DOM-Level-3-Events/events.html#Events-KeyboardEvent
and "data"
http://www.w3.org/TR/DOM-Level-3-Events/events.html#Events-TextEvents-Interfaces
I get the impression that WHATWG will not define its own keyboard events,
but instead refers to DOM3 Events.
http://www.whatwg.org/specs/web-apps/current-work/#events
Whiteboard: [WONTFIX?]
Assignee | ||
Updated•16 years ago
|
Product: Core → Core Graveyard
Updated•14 years ago
|
Assignee: mozilla-bugzilla → nobody
Component: GFX → DOM: Events
Product: Core Graveyard → Core
QA Contact: ian → events
Updated•14 years ago
|
Status: ASSIGNED → UNCONFIRMED
Ever confirmed: false
Comment 9•6 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Updated•5 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•