Sha256: f7249ac02705639694b21b61a71abc688469df5326e2f0be3ca9fb43ac2eb40e

Contents?: true

Size: 1.02 KB

Versions: 17

Compression:

Stored size: 1.02 KB

Contents

//= require jquery-ui/version

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [ "jquery", "./version" ], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.ui.safeActiveElement = function( document ) {
	var activeElement;

	// Support: IE 9 only
	// IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
	try {
		activeElement = document.activeElement;
	} catch ( error ) {
		activeElement = document.body;
	}

	// Support: IE 9 - 11 only
	// IE may return null instead of an element
	// Interestingly, this only seems to occur when NOT in an iframe
	if ( !activeElement ) {
		activeElement = document.body;
	}

	// Support: IE 11 only
	// IE11 returns a seemingly empty object in some cases when accessing
	// document.activeElement from an <iframe>
	if ( !activeElement.nodeName ) {
		activeElement = document.body;
	}

	return activeElement;
};

} );

Version data entries

17 entries across 17 versions & 5 rubygems

Version Path
activeadmin-3.2.5 vendor/assets/javascripts/jquery-ui/safe-active-element.js
alchemy_cms-7.0.15 vendor/assets/javascripts/jquery-ui/safe-active-element.js
activeadmin-3.2.4 vendor/assets/javascripts/jquery-ui/safe-active-element.js
activeadmin-3.2.3 vendor/assets/javascripts/jquery-ui/safe-active-element.js
alchemy_cms-7.0.14 vendor/assets/javascripts/jquery-ui/safe-active-element.js
activeadmin-3.2.2 vendor/assets/javascripts/jquery-ui/safe-active-element.js
alchemy_cms-7.0.13 vendor/assets/javascripts/jquery-ui/safe-active-element.js
alchemy_cms-7.0.12 vendor/assets/javascripts/jquery-ui/safe-active-element.js
jquery-ui-rails-7.0.0 app/assets/javascripts/jquery-ui/safe-active-element.js
alchemy_cms-7.0.11 vendor/assets/javascripts/jquery-ui/safe-active-element.js
alchemy_cms-7.0.10 vendor/assets/javascripts/jquery-ui/safe-active-element.js
alchemy_cms-7.0.9 vendor/assets/javascripts/jquery-ui/safe-active-element.js
jquery-ui-rails-dox-fork-7.0.2 app/assets/javascripts/jquery-ui/safe-active-element.js
alchemy_cms-7.0.8 vendor/assets/javascripts/jquery-ui/safe-active-element.js
alchemy_cms-7.0.7 vendor/assets/javascripts/jquery-ui/safe-active-element.js
alchemy_cms-7.0.6 vendor/assets/javascripts/jquery-ui/safe-active-element.js
jquery-ui-rails-test-6.0.2 app/assets/javascripts/jquery-ui/safe-active-element.js