Closed
Bug 1443148
Opened 7 years ago
Closed 7 years ago
Disabled HTMLElement does not fire events dispatched through JS (dispatchEvent)
Categories
(Core :: DOM: Events, defect, P3)
Tracking
()
RESOLVED
DUPLICATE
of bug 329509
People
(Reporter: oggoronic, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
Steps to reproduce:
1. Create any element that support the [disabled]-attribute (input, button, textarea etc.).
2. Setup a event listener for a CustomEvent on the element.
3. Trigger the event on the HTMLElement
See my explanation and code example here:
https://stackoverflow.com/questions/49065256/trigger-event-on-disabled-htmlelement
Actual results:
The event handler did not get called even though I expected it should.
Expected results:
The expected result should be that the event handler should fire.
According to the w3 spec nothing is mentioned on any other events that mouse events should not be dispatched:
https://www.w3.org/TR/2011/WD-html5-20110525/association-of-controls-and-forms.html#attr-fe-disabled
"A form control that is disabled must prevent any click events that are queued on the user interaction task source from being dispatched on the element."
Updated•7 years ago
|
Comment 1•7 years ago
|
||
This is easy to reproduce: https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=5844.
Given that this works in Chrome and Safari and the standard doesn't mention this at all, I'm inclined to agree with OP that we should fix this.
Flags: needinfo?(bugs)
Updated•7 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(bugs)
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•