mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Resizable: Don't use CSS shorthand properties with .css()
Fixes #7766 Closes gh-1644
This commit is contained in:
parent
11216554fe
commit
6a681c2c13
@ -99,7 +99,7 @@ $.widget( "ui.resizable", $.ui.mouse, {
|
|||||||
|
|
||||||
_create: function() {
|
_create: function() {
|
||||||
|
|
||||||
var n, i, handle, axis, hname,
|
var n, i, handle, axis, hname, margins,
|
||||||
that = this,
|
that = this,
|
||||||
o = this.options;
|
o = this.options;
|
||||||
this._addClass( "ui-resizable" );
|
this._addClass( "ui-resizable" );
|
||||||
@ -131,18 +131,15 @@ $.widget( "ui.resizable", $.ui.mouse, {
|
|||||||
|
|
||||||
this.elementIsWrapper = true;
|
this.elementIsWrapper = true;
|
||||||
|
|
||||||
this.element.css( {
|
margins = {
|
||||||
marginLeft: this.originalElement.css( "marginLeft" ),
|
|
||||||
marginTop: this.originalElement.css( "marginTop" ),
|
marginTop: this.originalElement.css( "marginTop" ),
|
||||||
marginRight: this.originalElement.css( "marginRight" ),
|
marginRight: this.originalElement.css( "marginRight" ),
|
||||||
marginBottom: this.originalElement.css( "marginBottom" )
|
marginBottom: this.originalElement.css( "marginBottom" ),
|
||||||
} );
|
marginLeft: this.originalElement.css( "marginLeft" )
|
||||||
this.originalElement.css( {
|
};
|
||||||
marginLeft: 0,
|
|
||||||
marginTop: 0,
|
this.element.css( margins );
|
||||||
marginRight: 0,
|
this.originalElement.css( "margin", 0 );
|
||||||
marginBottom: 0
|
|
||||||
} );
|
|
||||||
|
|
||||||
// support: Safari
|
// support: Safari
|
||||||
// Prevent Safari textarea resize
|
// Prevent Safari textarea resize
|
||||||
@ -157,7 +154,7 @@ $.widget( "ui.resizable", $.ui.mouse, {
|
|||||||
|
|
||||||
// Support: IE9
|
// Support: IE9
|
||||||
// avoid IE jump (hard set the margin)
|
// avoid IE jump (hard set the margin)
|
||||||
this.originalElement.css( { margin: this.originalElement.css( "margin" ) } );
|
this.originalElement.css( margins );
|
||||||
|
|
||||||
this._proportionallyResize();
|
this._proportionallyResize();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user