aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/js/ui/jquery.ui.core.js
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/js/ui/jquery.ui.core.js')
-rw-r--r--themes/default/js/ui/jquery.ui.core.js52
1 files changed, 29 insertions, 23 deletions
diff --git a/themes/default/js/ui/jquery.ui.core.js b/themes/default/js/ui/jquery.ui.core.js
index 1dbfd6358..5cafb07b7 100644
--- a/themes/default/js/ui/jquery.ui.core.js
+++ b/themes/default/js/ui/jquery.ui.core.js
@@ -1,5 +1,5 @@
/*!
- * jQuery UI 1.8.10
+ * jQuery UI 1.8.16
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -18,7 +18,7 @@ if ( $.ui.version ) {
}
$.extend( $.ui, {
- version: "1.8.10",
+ version: "1.8.16",
keyCode: {
ALT: 18,
@@ -58,6 +58,8 @@ $.extend( $.ui, {
// plugins
$.fn.extend({
+ propAttr: $.fn.prop || $.fn.attr,
+
_focus: $.fn.focus,
focus: function( delay, fn ) {
return typeof delay === "number" ?
@@ -174,6 +176,27 @@ $.each( [ "Width", "Height" ], function( i, name ) {
});
// selectors
+function focusable( element, isTabIndexNotNaN ) {
+ var nodeName = element.nodeName.toLowerCase();
+ if ( "area" === nodeName ) {
+ var map = element.parentNode,
+ mapName = map.name,
+ img;
+ if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
+ return false;
+ }
+ img = $( "img[usemap=#" + mapName + "]" )[0];
+ return !!img && visible( img );
+ }
+ return ( /input|select|textarea|button|object/.test( nodeName )
+ ? !element.disabled
+ : "a" == nodeName
+ ? element.href || isTabIndexNotNaN
+ : isTabIndexNotNaN)
+ // the element and all of its ancestors must be visible
+ && visible( element );
+}
+
function visible( element ) {
return !$( element ).parents().andSelf().filter(function() {
return $.curCSS( this, "visibility" ) === "hidden" ||
@@ -187,30 +210,13 @@ $.extend( $.expr[ ":" ], {
},
focusable: function( element ) {
- var nodeName = element.nodeName.toLowerCase(),
- tabIndex = $.attr( element, "tabindex" );
- if ( "area" === nodeName ) {
- var map = element.parentNode,
- mapName = map.name,
- img;
- if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
- return false;
- }
- img = $( "img[usemap=#" + mapName + "]" )[0];
- return !!img && visible( img );
- }
- return ( /input|select|textarea|button|object/.test( nodeName )
- ? !element.disabled
- : "a" == nodeName
- ? element.href || !isNaN( tabIndex )
- : !isNaN( tabIndex ))
- // the element and all of its ancestors must be visible
- && visible( element );
+ return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
},
tabbable: function( element ) {
- var tabIndex = $.attr( element, "tabindex" );
- return ( isNaN( tabIndex ) || tabIndex >= 0 ) && $( element ).is( ":focusable" );
+ var tabIndex = $.attr( element, "tabindex" ),
+ isTabIndexNaN = isNaN( tabIndex );
+ return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
}
});