Closed
Bug 880689
Opened 11 years ago
Closed 11 years ago
Disabled buttons does not receive custom events
Categories
(Core :: DOM: Events, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 329509
People
(Reporter: nekr, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31 Steps to reproduce: Run this code: <button id="test" disabled></button> <script> var button = document.querySelector('#test'); button.addEventListener('test', function() { alert(123); }); button.dispatchEvent(new CustomEvent('test')); </script> Please test in real html file, not via data:text/html, ... Actual results: Nothing. Expected results: Custom event should be dispatched and alert displayed. In Chrome this works. Other browsers are not tested yet.
Reporter | ||
Comment 1•11 years ago
|
||
How to hack via JS: http://pastebin.com/EuvLfqkJ
Reporter | ||
Comment 2•11 years ago
|
||
Also found this bug in IE (tested IE10 on Window 7). But only Firefox fails with wrapped disabling. Some thing like this: <fieldset disabled> <button></button> </fieldset> In this case, events 'll not be dispatched on button element. Shim and test case are here: https://gist.github.com/NekR/5732319
Updated•11 years ago
|
Component: Untriaged → DOM: Events
Product: Firefox → Core
Comment 3•11 years ago
|
||
Yeah, this is known.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•