Sha256: 20143892c3c09d738925cb2e4282a64f8a8cb089286f295c8bc83166b16d8f58

Contents?: true

Size: 1.43 KB

Versions: 161

Compression:

Stored size: 1.43 KB

Contents

define( [
	"../core",
	"../data/var/dataPriv",
	"./support",

	"../event",
	"./trigger"
], function( jQuery, dataPriv, support ) {

// 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 ) );
		};

		jQuery.event.special[ fix ] = {
			setup: function() {
				var doc = this.ownerDocument || this,
					attaches = dataPriv.access( doc, fix );

				if ( !attaches ) {
					doc.addEventListener( orig, handler, true );
				}
				dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
			},
			teardown: function() {
				var doc = this.ownerDocument || this,
					attaches = dataPriv.access( doc, fix ) - 1;

				if ( !attaches ) {
					doc.removeEventListener( orig, handler, true );
					dataPriv.remove( doc, fix );

				} else {
					dataPriv.access( doc, fix, attaches );
				}
			}
		};
	} );
}

return jQuery;
} );

Version data entries

161 entries across 104 versions & 11 rubygems

Version Path
epuber-0.12.0 lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js
epuber-0.11.1 lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js
epuber-0.11.0 lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js
epuber-0.10.3 lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js
epuber-0.10.2 lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js
epuber-0.10.1 lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js
epuber-0.9.3 lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js
epuber-0.9.2 lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js
epuber-0.9.1 lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js
epuber-0.9.0 lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js
epuber-0.8.0 lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js
epuber-0.7.4 lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js
epuber-0.7.3 lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js
epuber-0.7.2 lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js
epuber-0.7.1 lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js
epuber-0.7.0 lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js
jekyll-theme-pirati-7.7.1 _sass/foundation-sites/vendor/jquery/src/event/focusin.js
jekyll-theme-pirati-7.7.1 _sass/foundation-sites/node_modules/jquery/src/event/focusin.js
jekyll-theme-pirati-7.7.0 _sass/foundation-sites/vendor/jquery/src/event/focusin.js
jekyll-theme-pirati-7.7.0 _sass/foundation-sites/node_modules/jquery/src/event/focusin.js