Skip to content

Commit ca46a3a

Browse files
committed
Position: Fixed calculation of collision dimensions. Fixes #6812 - Position: Collision detection fails on the right side in Internet Explorer.
1 parent 1f0fd61 commit ca46a3a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ui/jquery.ui.position.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ $.fn.position = function( options ) {
8383

8484
if ( options.at[0] === "right" ) {
8585
basePosition.left += targetWidth;
86-
} else if (options.at[0] === center ) {
86+
} else if ( options.at[0] === center ) {
8787
basePosition.left += targetWidth / 2;
8888
}
8989

@@ -103,9 +103,9 @@ $.fn.position = function( options ) {
103103
marginLeft = parseInt( $.curCSS( this, "marginLeft", true ) ) || 0,
104104
marginTop = parseInt( $.curCSS( this, "marginTop", true ) ) || 0,
105105
collisionWidth = elemWidth + marginLeft +
106-
parseInt( $.curCSS( this, "marginRight", true ) ) || 0,
106+
( parseInt( $.curCSS( this, "marginRight", true ) ) || 0 ),
107107
collisionHeight = elemHeight + marginTop +
108-
parseInt( $.curCSS( this, "marginBottom", true ) ) || 0,
108+
( parseInt( $.curCSS( this, "marginBottom", true ) ) || 0 ),
109109
position = $.extend( {}, basePosition ),
110110
collisionPosition;
111111

0 commit comments

Comments
 (0)