mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Position: Fixed calculation of collision dimensions. Fixes #6812 - Position: Collision detection fails on the right side in Internet Explorer.
This commit is contained in:
parent
b6ed9328ef
commit
c1cc00f609
6
ui/jquery.ui.position.js
vendored
6
ui/jquery.ui.position.js
vendored
@ -82,7 +82,7 @@ $.fn.position = function( options ) {
|
|||||||
|
|
||||||
if ( options.at[0] === "right" ) {
|
if ( options.at[0] === "right" ) {
|
||||||
basePosition.left += targetWidth;
|
basePosition.left += targetWidth;
|
||||||
} else if (options.at[0] === center ) {
|
} else if ( options.at[0] === center ) {
|
||||||
basePosition.left += targetWidth / 2;
|
basePosition.left += targetWidth / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,9 +102,9 @@ $.fn.position = function( options ) {
|
|||||||
marginLeft = parseInt( $.curCSS( this, "marginLeft", true ) ) || 0,
|
marginLeft = parseInt( $.curCSS( this, "marginLeft", true ) ) || 0,
|
||||||
marginTop = parseInt( $.curCSS( this, "marginTop", true ) ) || 0,
|
marginTop = parseInt( $.curCSS( this, "marginTop", true ) ) || 0,
|
||||||
collisionWidth = elemWidth + marginLeft +
|
collisionWidth = elemWidth + marginLeft +
|
||||||
parseInt( $.curCSS( this, "marginRight", true ) ) || 0,
|
( parseInt( $.curCSS( this, "marginRight", true ) ) || 0 ),
|
||||||
collisionHeight = elemHeight + marginTop +
|
collisionHeight = elemHeight + marginTop +
|
||||||
parseInt( $.curCSS( this, "marginBottom", true ) ) || 0,
|
( parseInt( $.curCSS( this, "marginBottom", true ) ) || 0 ),
|
||||||
position = $.extend( {}, basePosition ),
|
position = $.extend( {}, basePosition ),
|
||||||
collisionPosition;
|
collisionPosition;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user