diff options
author | Konstantin Dinev <kdinev@mail.bw.edu> | 2017-02-24 17:36:19 +0200 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2017-02-24 14:30:58 -0500 |
commit | 278d1e1108e6c12d35be9edce2a9efcab1946229 (patch) | |
tree | 0913b92629f624f69fb1507ba6a936f81fbefea9 /ui/widgets/resizable.js | |
parent | a3b9129be19afabb3fa6b2fb913b85aab43f4652 (diff) | |
download | jquery-ui-278d1e1108e6c12d35be9edce2a9efcab1946229.tar.gz jquery-ui-278d1e1108e6c12d35be9edce2a9efcab1946229.zip |
Resizable: Keep user defined handles on _setOption
Fixes #15084
Closes gh-1795
Diffstat (limited to 'ui/widgets/resizable.js')
-rw-r--r-- | ui/widgets/resizable.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/widgets/resizable.js b/ui/widgets/resizable.js index f20bc791d..b5264ee53 100644 --- a/ui/widgets/resizable.js +++ b/ui/widgets/resizable.js @@ -250,6 +250,7 @@ $.widget( "ui.resizable", $.ui.mouse, { } ); this._handles = $(); + this._addedHandles = $(); if ( this.handles.constructor === String ) { if ( this.handles === "all" ) { @@ -269,7 +270,10 @@ $.widget( "ui.resizable", $.ui.mouse, { axis.css( { zIndex: o.zIndex } ); this.handles[ handle ] = ".ui-resizable-" + handle; - this.element.append( axis ); + if ( !this.element.children( this.handles[ handle ] ).length ) { + this.element.append( axis ); + this._addedHandles = this._addedHandles.add( axis ); + } } } @@ -335,7 +339,7 @@ $.widget( "ui.resizable", $.ui.mouse, { }, _removeHandles: function() { - this._handles.remove(); + this._addedHandles.remove(); }, _mouseCapture: function( event ) { |