Closed
Bug 601877
Opened 15 years ago
Closed 15 years ago
event listener for the invalid event does not work
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: mattcoz, Unassigned)
Details
Attachments
(1 file)
|
272 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b7pre) Gecko/20101002 Firefox/4.0b7pre
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b7pre) Gecko/20101002 Firefox/4.0b7pre
When a form is submitted and an input fails the constraint validation an "invalid" event is fired. Setting the "oninvalid" attribute on the input works, but setting the "oninvalid" property or adding an event listener for the "invalid" event does not.
Reproducible: Always
| Reporter | ||
Updated•15 years ago
|
Version: unspecified → Trunk
Comment 1•15 years ago
|
||
There are two parts in this bug report:
1. HTMLElement has no oninvalid property (nor oninput or onchange, etc.)
2. addEventListener('invalid') doesn't work
For 1. I will open a bug. But 2. seems to work for me.
Component: General → DOM: Events
OS: Windows 7 → All
Product: Firefox → Core
QA Contact: general → events
Hardware: x86 → All
Comment 2•15 years ago
|
||
(In reply to comment #1)
> There are two parts in this bug report:
> 1. HTMLElement has no oninvalid property (nor oninput or onchange, etc.)
I've open bug 618948
> 2. addEventListener('invalid') doesn't work
I'm renaming this bug and will attach a test case.
Summary: oninvalid event not firing when assigned as property or event listener → event listener for the invalid event does not work
Comment 3•15 years ago
|
||
For 1. we should do the same as for other onfoo listeners: just add it
to nsDOMClassInfo.
We have already bugs open to change the way we register onfoo listeners.
Comment 4•15 years ago
|
||
Comment 5•15 years ago
|
||
You should see an alert with the message "invalid event" if you press enter in the input element while empty. This should work on trunk.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•