Sha256: 06ecded7026ce07cdb848e364c4a81b085f42f2d8e8a1f258d3b8a394b811fa6

Contents?: true

Size: 984 Bytes

Versions: 36

Compression:

Stored size: 984 Bytes

Contents

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

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

		// Browser globals
		factory( jQuery );
	}
} ( function( $ ) {
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

36 entries across 36 versions & 4 rubygems

Version Path
ext_yarn-0.6.0 vendor/jquery-ui/ui/safe-active-element.js
ext_yarn-0.5.0 vendor/jquery-ui/ui/safe-active-element.js
ext_yarn-0.4.0 vendor/jquery-ui/ui/safe-active-element.js
ext_yarn-0.3.1 vendor/jquery-ui/ui/safe-active-element.js
ext_yarn-0.3.0 vendor/jquery-ui/ui/safe-active-element.js
ext_yarn-0.2.0 vendor/jquery-ui/ui/safe-active-element.js
ext_yarn-0.1.2 node_modules/jquery-ui/ui/safe-active-element.js
ext_yarn-0.1.1 node_modules/jquery-ui/ui/safe-active-element.js
ext_yarn-0.1.0 node_modules/jquery-ui/ui/safe-active-element.js
ext_sprockets-0.1.6 node_modules/jquery-ui/ui/safe-active-element.js
ext_sprockets-0.1.5 node_modules/jquery-ui/ui/safe-active-element.js
ext_sprockets-0.1.1 node_modules/jquery-ui/ui/safe-active-element.js
trusty-cms-3.1.6 app/assets/bower_components/jquery-ui/ui/safe-active-element.js
trusty-cms-3.1.5 app/assets/bower_components/jquery-ui/ui/safe-active-element.js
trusty-cms-3.1.3 app/assets/bower_components/jquery-ui/ui/safe-active-element.js
trusty-cms-3.1.2 app/assets/bower_components/jquery-ui/ui/safe-active-element.js
trusty-cms-3.0.11 app/assets/bower_components/jquery-ui/ui/safe-active-element.js
trusty-cms-3.1.1 app/assets/bower_components/jquery-ui/ui/safe-active-element.js
trusty-cms-3.0.10 app/assets/bower_components/jquery-ui/ui/safe-active-element.js
trusty-cms-3.1.0 app/assets/bower_components/jquery-ui/ui/safe-active-element.js