]> source.dussan.org Git - jquery.git/commitdiff
Prevent IE from firing live/delegate events on disabled elements. (#6911)
authordanheberden <danheberden@gmail.com>
Mon, 25 Oct 2010 21:07:44 +0000 (14:07 -0700)
committerdanheberden <danheberden@gmail.com>
Mon, 25 Oct 2010 21:07:44 +0000 (14:07 -0700)
src/event.js

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