#17406 closed defect (invalid)
on.selector catches events on disabled elements (chrome, IE)
Reported by: | patrickzope | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Events | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Under Chrome 29.0.1547.57, a delegate event handler for a disabled element will still fire if it has child elements.
Example:
Under Firefox 23.0.1, I get the desired behavior that the handler is not called.
Change History (2)
comment:1 Changed 8 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 8 years ago by
Component: | General → Events |
---|---|
Summary: | on.selector event delegation bug in Chrome → on.selector catches events on disabled elements (chrome, IE) |
Note: See
TracTickets for help on using
tickets.
the behavior in chrome is the same in IE 9 and IE 10 and is the expected behavior. Firefox is the odd one out here and it has been a bug of theirs for quite some time now - https://bugzilla.mozilla.org/show_bug.cgi?id=329509.
my suggestion is that if you want to consistently avoid disabled elements you can either change your selector
".foo-btn:not([disabled])"
or add some logic to your handler to check if the target element is disabled.