Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#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:

http://jsfiddle.net/jphdb/1/

Under Firefox 23.0.1, I get the desired behavior that the handler is not called.

Change History (2)

comment:1 Changed 6 years ago by ben hockey

Resolution: invalid
Status: newclosed

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.

comment:2 Changed 6 years ago by bill

Component: GeneralEvents
Summary: on.selector event delegation bug in Chromeon.selector catches events on disabled elements (chrome, IE)
Note: See TracTickets for help on using tickets.