Closed Bug 37116 Opened 25 years ago Closed 24 years ago

event.preventDefault() does not work on input text field

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P2)

x86
Linux
defect

Tracking

()

VERIFIED DUPLICATE of bug 42553

People

(Reporter: han.holl, Assigned: mjudge)

References

Details

(Whiteboard: [nsbeta3+][p:2])

Attachments

(1 file)

<?xml version="1.0"?> <window id="demo-window" title="Demo preventDefault bug" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> Repeat with the following: <html:script> function keyp(event) { event.preventDefault(); } </html:script> <html:input onkeypress="keyp(event);" /> </window> Action: Type some characters in textfield Expected result: Text field should remain empty. Actual result: Characters appear in text field Cheers, Han Holl
I confirmed that the problem is that preventDefault does not work. The event is being received by the function (I tested with alerts). Confirming bug.
Status: UNCONFIRMED → NEW
Ever confirmed: true
*** Bug 38630 has been marked as a duplicate of this bug. ***
This is really needed for the autocomplete widget.
Severity: normal → major
Okay, this looks like we just need an easy check of the event's preventDefault state. mjudge said he'd take this (hopefully) easy fix for me.
Assignee: joki → mjudge
setting to m17 for now
Target Milestone: --- → M17
need to move event listeners on ender-lite from the DOM to the frame itself. this way we can see if anyone prevented default. straightforward but non-trivial.
Status: NEW → ASSIGNED
Keywords: correctness, nsbeta3
Target Milestone: M17 → M18
Mass update: changing qacontact to ckritzer@netscape.com
QA Contact: janc → ckritzer
setting to nsbeta3+
Whiteboard: nsbeta3+
adding the brackets in the status
Whiteboard: nsbeta3+ → [nsbeta3+]
Priority: P3 → P2
Whiteboard: [nsbeta3+] → [nsbeta3+][p:2]
*** This bug has been marked as a duplicate of 42553 ***
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Marking VERIFIED DUPLICATE on: - LinuxRH62 2000-09-13-08-M18 Commercial - Win98 2000-09-13-08-M18 Mozilla - MacOS86 2000-09-13-04-M18 Commercial
Status: RESOLVED → VERIFIED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: