Skip to content

Commit c1cc00f

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

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ui/jquery.ui.position.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ $.fn.position = function( options ) {
8282

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

@@ -102,9 +102,9 @@ $.fn.position = function( options ) {
102102
marginLeft = parseInt( $.curCSS( this, "marginLeft", true ) ) || 0,
103103
marginTop = parseInt( $.curCSS( this, "marginTop", true ) ) || 0,
104104
collisionWidth = elemWidth + marginLeft +
105-
parseInt( $.curCSS( this, "marginRight", true ) ) || 0,
105+
( parseInt( $.curCSS( this, "marginRight", true ) ) || 0 ),
106106
collisionHeight = elemHeight + marginTop +
107-
parseInt( $.curCSS( this, "marginBottom", true ) ) || 0,
107+
( parseInt( $.curCSS( this, "marginBottom", true ) ) || 0 ),
108108
position = $.extend( {}, basePosition ),
109109
collisionPosition;
110110

0 commit comments

Comments
 (0)