From bbd9c776ea22296a6807d5b760bd4e82ee5f4414 Mon Sep 17 00:00:00 2001 From: Dave Methvin Date: Mon, 4 Apr 2011 10:27:31 -0400 Subject: [PATCH] Fix #8732. Change feature detect for focusin event support, so IE9 won't have duplicate events. --- src/event.js | 2 +- src/support.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/event.js b/src/event.js index 0323ffb75..9a63b5f93 100644 --- a/src/event.js +++ b/src/event.js @@ -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 diff --git a/src/support.js b/src/support.js index 4c309562f..8b950e25f 100644 --- a/src/support.js +++ b/src/support.js @@ -226,6 +226,7 @@ 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; -- 2.39.5