Closed
Bug 467513
Opened 16 years ago
Closed 14 years ago
Some keypress events don't bubble out of input fields
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: fabian.jakobs, Unassigned)
Details
Attachments
(1 file, 1 obsolete file)
|
1.13 KB,
text/html
|
Details |
I usually catch all key events on the document body but it in input fields (type=text) some keypress events don't bubble. I observed this with the Up, Down, PageUp and PageDown events. Maybe there are some more keys.
Pressing e.g. down in an input field fires keypress on the field but not on the document.body. Keydown and keyup events are fired and bubble as expected.
I have verified this problem in Firefox 2 and 3 on OSX.
| Reporter | ||
Comment 1•16 years ago
|
||
If you focus the input field and press the Up arrow key, no keypress is dispatched on the document body. Pressing the Left arrow key however fires a keypress on the body.
| Reporter | ||
Comment 2•16 years ago
|
||
If you focus the input field and press the Up arrow key, no keypress is dispatched on the document body. Pressing the Left arrow key however fires a keypress on the body.
Updated•16 years ago
|
Component: General → Event Handling
Product: Firefox → Core
QA Contact: general → events
Version: 3.0 Branch → 1.9.0 Branch
Comment 3•16 years ago
|
||
Can you check if this bug is still present in a 3.1 nightly?
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/
I can reproduce it in 3.0.4 but not in a recent 3.1 nightly.
| Reporter | ||
Comment 4•16 years ago
|
||
I can still reproduce it with the latest trunk. Tested on OSX 10.5.
Comment 5•16 years ago
|
||
Oh, now I can, too. It looks like the bug only occurs when the cursor is at the start (up) / end (down) of the textfield.
Bug 231754 might have to do something with this (just guessing).
Severity: major → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: All → Mac OS X
Hardware: Macintosh → All
Version: 1.9.0 Branch → Trunk
Updated•16 years ago
|
Attachment #350945 -
Attachment is obsolete: true
Comment 6•16 years ago
|
||
Seems like that bug may very well have caused this.
Comment 7•16 years ago
|
||
Or, not caused, but made this worse.
Comment 8•16 years ago
|
||
I think really we want the various ui behaviour to be the default handling for the event rather than just a listener. Then we don't need to call stopPropagation at all. But that's not possible currently until xbl2.
Comment 9•16 years ago
|
||
It is possible (at least in C++ and XBL) if we register listeners to system event group.
Comment 10•16 years ago
|
||
And also if chrome JS adds event listeners for bubble phase to somewhere
in chrome, those are called after content listeners - so they are in practice
default handlers.
Comment 11•16 years ago
|
||
This problem also happens on Windows and Linux, so -> All.
For that matter it also happens in FF2.
OS: Mac OS X → All
Comment 12•14 years ago
|
||
This seems to work with 3.6.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
| Assignee | ||
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•