app/assets/javascripts/jquery-ui/focusable.js in jquery-ui-rails-6.0.1 vs app/assets/javascripts/jquery-ui/focusable.js in jquery-ui-rails-7.0.0

- old
+ new

@@ -1,9 +1,9 @@ //= require jquery-ui/version /*! - * jQuery UI Focusable 1.12.1 + * jQuery UI Focusable 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license @@ -13,20 +13,23 @@ //>>group: Core //>>description: Selects elements which can be focused. //>>docs: http://api.jqueryui.com/focusable-selector/ ( 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( $ ) { +} )( function( $ ) { +"use strict"; // Selectors $.ui.focusable = function( element, hasTabindex ) { var map, mapName, img, focusableIfVisible, fieldset, nodeName = element.nodeName.toLowerCase(); @@ -70,17 +73,17 @@ var visibility = element.css( "visibility" ); while ( visibility === "inherit" ) { element = element.parent(); visibility = element.css( "visibility" ); } - return visibility !== "hidden"; + return visibility === "visible"; } -$.extend( $.expr[ ":" ], { +$.extend( $.expr.pseudos, { focusable: function( element ) { return $.ui.focusable( element, $.attr( element, "tabindex" ) != null ); } } ); return $.ui.focusable; -} ) ); +} );