Do not prevent event dispatching via dispatchEvent even if there is no prescontext or (form) element is disabled
Categories
(Core :: DOM: Events, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: smaug, Assigned: marcosc)
References
(Blocks 2 open bugs, Regressed 1 open bug)
Details
(Keywords: dev-doc-complete, site-compat, Whiteboard: [webcompat:p2][wptsync upstream])
Attachments
(5 files, 1 obsolete file)
2.56 KB,
text/html
|
Details | |
13.67 KB,
patch
|
Details | Diff | Splinter Review | |
12.16 KB,
patch
|
Details | Diff | Splinter Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
2.07 KB,
text/html
|
Details |
Comment 1•19 years ago
|
||
Reporter | ||
Comment 2•19 years ago
|
||
Comment 3•19 years ago
|
||
Reporter | ||
Comment 4•19 years ago
|
||
Comment 5•19 years ago
|
||
Reporter | ||
Comment 6•19 years ago
|
||
Comment 7•19 years ago
|
||
Reporter | ||
Comment 8•19 years ago
|
||
![]() |
||
Comment 10•19 years ago
|
||
Comment 11•19 years ago
|
||
Reporter | ||
Comment 12•19 years ago
|
||
Reporter | ||
Comment 13•19 years ago
|
||
Comment 14•19 years ago
|
||
Reporter | ||
Comment 15•19 years ago
|
||
![]() |
||
Comment 16•19 years ago
|
||
![]() |
||
Comment 17•19 years ago
|
||
![]() |
||
Updated•19 years ago
|
Reporter | ||
Updated•18 years ago
|
Reporter | ||
Updated•18 years ago
|
Reporter | ||
Comment 18•18 years ago
|
||
Reporter | ||
Comment 19•18 years ago
|
||
Reporter | ||
Comment 20•18 years ago
|
||
Reporter | ||
Updated•18 years ago
|
Reporter | ||
Updated•17 years ago
|
Updated•16 years ago
|
Comment 25•12 years ago
|
||
Comment hidden (abuse-reviewed) |
![]() |
||
Comment 28•9 years ago
|
||
Comment 29•9 years ago
|
||
Reporter | ||
Comment 30•9 years ago
|
||
Comment 31•8 years ago
|
||
Updated•8 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 35•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 36•6 years ago
|
||
Assignee | ||
Comment 37•6 years ago
|
||
Reporter | ||
Comment 38•6 years ago
|
||
Assignee | ||
Comment 39•6 years ago
|
||
Assignee | ||
Comment 40•6 years ago
|
||
Reporter | ||
Comment 41•6 years ago
|
||
Assignee | ||
Comment 42•6 years ago
|
||
Updated•6 years ago
|
Comment 43•6 years ago
|
||
Assignee | ||
Comment 44•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 46•6 years ago
|
||
bugherder |
Comment 48•6 years ago
|
||
Comment 49•6 years ago
|
||
Comment 50•6 years ago
|
||
I'd like to clarify if this is related to issue I'm facing: disabled inputs block CSS transition events.
Behavior is the same in FF 56 & FF 66 (Build ID 20190211185957).
Assignee | ||
Comment 51•6 years ago
|
||
(In reply to ZeroUnderscoreOu from comment #50)
I'd like to clarify if this is related to issue I'm facing: disabled inputs block CSS transition events.
Behavior is the same in FF 56 & FF 66 (Build ID 20190211185957).
If you have a reduced test case, I'd be happy to have take a look.
Comment 52•6 years ago
|
||
Testcase file. It has 4 buttons (2 <Inputs>, 2 <Buttons>, 2 enabled, 2 disabled). Fifth button triggers styling changes, which leads to transitions. Handler logs events info to console.
In Firefox, transition events on disabled elements get "eaten". This is highlighted by a separate listener for an element which is inside a disabled button.
Console output in Firefox:
transitionend from Input_Enabled to Window
transitionend from Button_Enabled to Window
transitionend from Span_Enabled to Window
transitionend from Span_Disabled to Span_Disabled
In Chrome:
transitionend from Input_Enabled to Window
transitionend from Input_Disabled to Window
transitionend from Button_Enabled to Window
transitionend from Span_Enabled to Window
transitionend from Button_Disabled to Window
transitionend from Span_Disabled to Span_Disabled
transitionend from Span_Disabled to Window
I expect Firefox to behave the same way Chrome does, in this particular case.
Tested on Firefox 66.0b8 (Build ID 20190214195736) & Chrome 72.0.3626.109 64 bit, Windows 7 x64.
Assignee | ||
Comment 53•6 years ago
|
||
@smaug, I'm unsure where to find what controls the transition dispatching - but it's indeed not dispatching "transitionend" for disabled input elements? Any pointers would be helpful.
Reporter | ||
Comment 54•6 years ago
|
||
Add the needed events to https://searchfox.org/mozilla-central/rev/dc0adc07db3df9431a0876156f50c65d580010cb/dom/html/nsGenericHTMLElement.cpp#1962
(I wonder if we'll change that list to be black list including only eClick or so)
Assignee | ||
Comment 55•6 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #54)
Add the needed events to https://searchfox.org/mozilla-central/rev/dc0adc07db3df9431a0876156f50c65d580010cb/dom/html/nsGenericHTMLElement.cpp#1962
Thanks!
(I wonder if we'll change that list to be black list including only eClick or so)
Yeah, might make sense. There is also that other more bogus stuff we might be able to get rid of:
// FIXME(emilio): This poking at the style of the frame is slightly bogus
// unless we flush before every event, which we don't really want to do.
if (aFrame && aFrame->StyleUI()->mUserInput == StyleUserInput::None) {
return true;
}
Anyway, will add the event cases to the switch and we can wait and see other web compat issues come up.
Assignee | ||
Comment 56•6 years ago
|
||
ZeroUnderscoreOu, the patch in bug 1530239 will be landing soon to fix the transitions issue (just doing final checks before merge). Thank you for reporting the issue and for the test case - it was quite helpful!
Comment 57•6 years ago
|
||
Glad I was able to help. Thank you for your work!
Assignee | ||
Comment 58•6 years ago
|
||
Also fixing for CSS Animations 🎉 They had the same issue (bug #1531605).
Comment 59•6 years ago
|
||
I may be doing something wrong, but for me (Firefox 66.0.5 - Linux) the issue still persists. Events are not dispatched when the element is disabled. Example here: https://codepen.io/anon/pen/vWMNjV
![]() |
||
Comment 60•6 years ago
|
||
This bug was specifically about manually-dispatched (via dispatchEvent
) events. That testcase is using actual click events generated by user interaction, which is a very different situation.
![]() |
||
Updated•6 years ago
|
Assignee | ||
Comment 61•6 years ago
|
||
robbendebiene, please follow:
https://bugzilla.mozilla.org/show_bug.cgi?id=1540995
Updated•5 years ago
|
Description
•