mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
parent
2b84531ae9
commit
26fc3b5587
14
ui/core.js
14
ui/core.js
@ -30,6 +30,7 @@
|
||||
"./jquery-1-7",
|
||||
"./plugin",
|
||||
"./safe-active-element",
|
||||
"./safe-blur",
|
||||
"./version"
|
||||
], factory );
|
||||
} else {
|
||||
@ -39,19 +40,6 @@
|
||||
}
|
||||
}( function( $ ) {
|
||||
|
||||
$.extend( $.ui, {
|
||||
|
||||
// Internal use only
|
||||
safeBlur: function( element ) {
|
||||
|
||||
// Support: IE9 - 10 only
|
||||
// If the <body> is blurred, IE will switch windows, see #9420
|
||||
if ( element && element.nodeName.toLowerCase() !== "body" ) {
|
||||
$( element ).trigger( "blur" );
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
// plugins
|
||||
$.fn.extend( {
|
||||
scrollParent: function( includeHidden ) {
|
||||
|
@ -31,7 +31,8 @@
|
||||
"./mouse",
|
||||
"./position",
|
||||
"./resizable",
|
||||
"./safe-active-element"
|
||||
"./safe-active-element",
|
||||
"./safe-blur"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
"./mouse",
|
||||
"./plugin",
|
||||
"./safe-active-element",
|
||||
"./safe-blur",
|
||||
"./version",
|
||||
"./widget"
|
||||
], factory );
|
||||
|
21
ui/safe-blur.js
Normal file
21
ui/safe-blur.js
Normal file
@ -0,0 +1,21 @@
|
||||
( 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.safeBlur = function( element ) {
|
||||
|
||||
// Support: IE9 - 10 only
|
||||
// If the <body> is blurred, IE will switch windows, see #9420
|
||||
if ( element && element.nodeName.toLowerCase() !== "body" ) {
|
||||
$( element ).trigger( "blur" );
|
||||
}
|
||||
};
|
||||
|
||||
} ) );
|
Loading…
Reference in New Issue
Block a user