]> source.dussan.org Git - jquery-ui.git/commitdiff
Sortable: Rename `storedStylesheet` to `_storedStylesheet`
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Mon, 6 May 2024 22:03:19 +0000 (00:03 +0200)
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Tue, 14 May 2024 22:38:40 +0000 (00:38 +0200)
This follows the naming strategy for other internal properties.

Ref gh-2249

ui/widgets/sortable.js

index 32333b6f51b68de435cba33f0de6bf5f15b0b966..55b570bb4313729dc4b33eb69457243194b2251e 100644 (file)
@@ -275,7 +275,7 @@ return $.widget( "ui.sortable", $.ui.mouse, {
                if ( o.cursor && o.cursor !== "auto" ) { // cursor option
                        body = this.document.find( "body" );
 
-                       this.storedStylesheet =
+                       this._storedStylesheet =
                                $( "<style>*{ cursor: " + o.cursor + " !important; }</style>" ).appendTo( body );
                }
 
@@ -1542,8 +1542,9 @@ return $.widget( "ui.sortable", $.ui.mouse, {
                }
 
                //Do what was originally in plugins
-               if ( this.storedStylesheet ) {
-                       this.storedStylesheet.remove();
+               if ( this._storedStylesheet ) {
+                       this._storedStylesheet.remove();
+                       this._storedStylesheet = null;
                }
                if ( this._storedOpacity ) {
                        this.helper.css( "opacity", this._storedOpacity );