Prevent IE from firing live/delegate events on disabled elements. (#6911)

This commit is contained in:
danheberden 2010-10-25 14:07:44 -07:00
parent a4fc842019
commit bd474799bf

View file

@ -1068,6 +1068,11 @@ function liveHandler( event ) {
if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) { if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) {
return; return;
} }
// IE will still dispatch events on disabled elements, so halt it (#6911)
if( event.target.disabled ) {
return;
}
if ( event.namespace ) { if ( event.namespace ) {
namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)"); namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");