Closed
Bug 122212
Opened 23 years ago
Closed 23 years ago
when capturing keypressevent code can't cancel keys pressed in input type="text" and textarea elements
Categories
(Core :: DOM: Events, defect)
Tracking
()
People
(Reporter: martin.honnen, Assigned: joki)
Details
Attachments
(1 file)
I am trying to capture the keypress event and then depending on the key I want
to cancel the event. However, despite calling both
event.preventDefault()
and
event.stopPropagation()
the keypress is not cancelled when occuring inside a textarea or an input
type="text" element. As I in the example try to cancel the return key I also
included a link and a button in the test case and there the cancellation of the
return key works as the button/link can't be activated by focussing on them and
pressing return.
So we are faced with keypress event targetted at textarea elements and text
input elements not being cancellable.
NN4 has no problems to capture the keypress and cancel it in the textarea/text
input. And with IE6's event bubbling system it is also possible to cancel the
key when intended.
Reporter | ||
Comment 1•23 years ago
|
||
Assignee | ||
Comment 2•23 years ago
|
||
*** This bug has been marked as a duplicate of 54035 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•