mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-10-05 01:44:18 +00:00
Fixed inability to modify autoHide behavior after initialization
Resizable: Previously, changing the autoHide option after initialization wouldn't change the behavior of the handles auto-hiding. This fix allows the resizable widget to accurately reflect the current autoHide state. Fixed #5408 - Resizable: autoHide option cannot be changed after initialization. https://bugs.jqueryui.com/ticket/5408
This commit is contained in:
parent
74f8a0ac95
commit
f3620c34a7
@ -161,25 +161,23 @@ $.widget( "ui.resizable", $.ui.mouse, {
|
||||
|
||||
this._setupHandles();
|
||||
|
||||
if ( o.autoHide ) {
|
||||
$( this.element )
|
||||
.on( "mouseenter", function() {
|
||||
if ( o.disabled ) {
|
||||
return;
|
||||
}
|
||||
that._removeClass( "ui-resizable-autohide" );
|
||||
that._handles.show();
|
||||
} )
|
||||
.on( "mouseleave", function() {
|
||||
if ( o.disabled ) {
|
||||
return;
|
||||
}
|
||||
if ( !that.resizing ) {
|
||||
that._addClass( "ui-resizable-autohide" );
|
||||
that._handles.hide();
|
||||
}
|
||||
} );
|
||||
}
|
||||
$( this.element )
|
||||
.on( "mouseenter", function() {
|
||||
if ( o.disabled || !o.autoHide ) {
|
||||
return;
|
||||
}
|
||||
that._removeClass( "ui-resizable-autohide" );
|
||||
that._handles.show();
|
||||
} )
|
||||
.on( "mouseleave", function() {
|
||||
if ( o.disabled || !o.autoHide ) {
|
||||
return;
|
||||
}
|
||||
if ( !that.resizing ) {
|
||||
that._addClass( "ui-resizable-autohide" );
|
||||
that._handles.hide();
|
||||
}
|
||||
} );
|
||||
|
||||
this._mouseInit();
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user