Fix #8732. Change feature detect for focusin event support, so IE9 won't have duplicate events.

This commit is contained in:
Dave Methvin 2011-04-04 10:27:31 -04:00
parent b7dd8404c5
commit bbd9c776ea
2 changed files with 2 additions and 1 deletions

View 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

View file

@ -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;