Sha256: b55129e41818694a53fb5cdbd3513a551ccd7c68f6ae866ef5bab30572b65090

Contents?: true

Size: 1 KB

Versions: 19

Compression:

Stored size: 1 KB

Contents

//= require rails_admin/jquery-ui/version

( 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

19 entries across 19 versions & 1 rubygems

Version Path
rails_admin-3.2.1 vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.2.0 vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.2.0.rc vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.2.0.beta vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.1.4 vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.1.3 vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.1.2 vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.1.1 vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.1.0 vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.1.0.rc2 vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.1.0.rc vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.1.0.beta vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.0.0 vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.0.0.rc4 vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.0.0.rc3 vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.0.0.rc2 vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.0.0.rc vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.0.0.beta2 vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js
rails_admin-3.0.0.beta vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js