diff -r be944660c56a -r 3d72ae0968f4 wp/wp-includes/js/jquery/ui/resizable.js --- a/wp/wp-includes/js/jquery/ui/resizable.js Wed Sep 21 18:19:35 2022 +0200 +++ b/wp/wp-includes/js/jquery/ui/resizable.js Tue Sep 27 16:37:53 2022 +0200 @@ -1,5 +1,5 @@ /*! - * jQuery UI Resizable 1.12.1 + * jQuery UI Resizable 1.13.1 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -17,6 +17,8 @@ //>>css.theme: ../../themes/base/theme.css ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -30,10 +32,11 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; $.widget( "ui.resizable", $.ui.mouse, { - version: "1.12.1", + version: "1.13.1", widgetEventPrefix: "resize", options: { alsoResize: false, @@ -88,9 +91,15 @@ // TODO: determine which cases actually cause this to happen // if the element doesn't have the scroll set, see if it's possible to // set the scroll - el[ scroll ] = 1; - has = ( el[ scroll ] > 0 ); - el[ scroll ] = 0; + try { + el[ scroll ] = 1; + has = ( el[ scroll ] > 0 ); + el[ scroll ] = 0; + } catch ( e ) { + + // `el` might be a string, then setting `scroll` will throw + // an error in strict mode; ignore it. + } return has; }, @@ -113,7 +122,8 @@ if ( this.element[ 0 ].nodeName.match( /^(canvas|textarea|input|select|button|img)$/i ) ) { this.element.wrap( - $( "
" ).css( { + $( "" ).css( { + overflow: "hidden", position: this.element.css( "position" ), width: this.element.outerWidth(), height: this.element.outerHeight(), @@ -184,15 +194,14 @@ _destroy: function() { this._mouseDestroy(); + this._addedHandles.remove(); var wrapper, _destroy = function( exp ) { $( exp ) .removeData( "resizable" ) .removeData( "ui-resizable" ) - .off( ".resizable" ) - .find( ".ui-resizable-handle" ) - .remove(); + .off( ".resizable" ); }; // TODO: Unwrap at same DOM position @@ -219,12 +228,15 @@ this._super( key, value ); switch ( key ) { - case "handles": - this._removeHandles(); - this._setupHandles(); - break; - default: - break; + case "handles": + this._removeHandles(); + this._setupHandles(); + break; + case "aspectRatio": + this._aspectRatio = !!value; + break; + default: + break; } }, @@ -244,6 +256,7 @@ } ); this._handles = $(); + this._addedHandles = $(); if ( this.handles.constructor === String ) { if ( this.handles === "all" ) { @@ -255,7 +268,7 @@ for ( i = 0; i < n.length; i++ ) { - handle = $.trim( n[ i ] ); + handle = String.prototype.trim.call( n[ i ] ); hname = "ui-resizable-" + handle; axis = $( "