};
});
-// Support: Firefox, Chrome, Safari
-// Create "bubbling" focus and blur events
-if ( !support.focusinBubbles ) {
+// Support: Firefox
+// Firefox doesn't have focus(in | out) events
+// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
+//
+// Support: Chrome, Safari
+// focus(in | out) events fire after focus & blur events,
+// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
+// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857
+if ( !support.focusin ) {
jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
// Attach a single capturing handler on the document while someone wants focusin/focusout
var handler = function( event ) {
- jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
- };
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+ };
jQuery.event.special[ fix ] = {
setup: function() {
"clearCloneStyle": true,
"cors": true,
"createHTMLDocument": true,
- "focusinBubbles": false,
+ "focusin": false,
"noCloneChecked": true,
"optDisabled": true,
"optSelected": true,
"clearCloneStyle": false,
"cors": true,
"createHTMLDocument": true,
- "focusinBubbles": true,
+ "focusin": true,
"noCloneChecked": false,
"optDisabled": true,
"optSelected": false,
"clearCloneStyle": false,
"cors": false,
"createHTMLDocument": true,
- "focusinBubbles": true,
+ "focusin": true,
"noCloneChecked": false,
"optDisabled": true,
"optSelected": false,
"clearCloneStyle": true,
"cors": true,
"createHTMLDocument": false,
- "focusinBubbles": false,
+ "focusin": false,
"noCloneChecked": true,
"optDisabled": true,
"optSelected": true,
"clearCloneStyle": true,
"cors": true,
"createHTMLDocument": true,
- "focusinBubbles": false,
+ "focusin": false,
"noCloneChecked": true,
"optDisabled": true,
"optSelected": true,
"clearCloneStyle": true,
"cors": true,
"createHTMLDocument": true,
- "focusinBubbles": false,
+ "focusin": false,
"noCloneChecked": true,
"optDisabled": true,
"optSelected": true,
"clearCloneStyle": true,
"cors": true,
"createHTMLDocument": false,
- "focusinBubbles": false,
+ "focusin": false,
"noCloneChecked": true,
"optDisabled": true,
"optSelected": true,
"clearCloneStyle": true,
"cors": true,
"createHTMLDocument": true,
- "focusinBubbles": false,
+ "focusin": false,
"noCloneChecked": true,
"optDisabled": true,
"optSelected": true,
"clearCloneStyle": true,
"cors": true,
"createHTMLDocument": true,
- "focusinBubbles": false,
+ "focusin": false,
"noCloneChecked": true,
"optDisabled": true,
"optSelected": true,
"clearCloneStyle": false,
"cors": true,
"createHTMLDocument": true,
- "focusinBubbles": false,
+ "focusin": false,
"noCloneChecked": true,
"optDisabled": false,
"optSelected": true,