]> source.dussan.org Git - jquery.git/commitdiff
Fix #8732. Change feature detect for focusin event support, so IE9 won't have duplica...
authorDave Methvin <dave.methvin@gmail.com>
Mon, 4 Apr 2011 14:27:31 +0000 (10:27 -0400)
committerDave Methvin <dave.methvin@gmail.com>
Thu, 7 Apr 2011 03:06:52 +0000 (23:06 -0400)
src/event.js
src/support.js

index 0323ffb7585555c22676f8b6fe374a2171a8519e..9a63b5f93e0910221ccfff1602520ceb0993d151 100644 (file)
@@ -850,7 +850,7 @@ function trigger( type, elem, args ) {
 }
 
 // Create "bubbling" focus and blur events
-if ( document.addEventListener ) {
+if ( !jQuery.support.focusinBubbles ) {
        jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
        
                // Attach a single capturing handler while someone wants focusin/focusout
index 4c309562f7c17c6a7d17ebfd1c2a5a24af514c5b..8b950e25f22954b486186175a016a4ae322be266 100644 (file)
 
        jQuery.support.submitBubbles = eventSupported("submit");
        jQuery.support.changeBubbles = eventSupported("change");
+       jQuery.support.focusinBubbles = document.attachEvent && eventSupported("focusin");
 
        // release memory in IE
        div = all = a = null;