Skip to content

Commit

Permalink
Position: Fixed calculation of collision dimensions. Fixes #6812 - Po…
Browse files Browse the repository at this point in the history
…sition: Collision detection fails on the right side in Internet Explorer.
  • Loading branch information
scottgonzalez committed Jan 12, 2011
1 parent b6ed932 commit c1cc00f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/jquery.ui.position.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ $.fn.position = function( options ) {

if ( options.at[0] === "right" ) {
basePosition.left += targetWidth;
} else if (options.at[0] === center ) {
} else if ( options.at[0] === center ) {
basePosition.left += targetWidth / 2;
}

Expand All @@ -102,9 +102,9 @@ $.fn.position = function( options ) {
marginLeft = parseInt( $.curCSS( this, "marginLeft", true ) ) || 0,
marginTop = parseInt( $.curCSS( this, "marginTop", true ) ) || 0,
collisionWidth = elemWidth + marginLeft +
parseInt( $.curCSS( this, "marginRight", true ) ) || 0,
( parseInt( $.curCSS( this, "marginRight", true ) ) || 0 ),
collisionHeight = elemHeight + marginTop +
parseInt( $.curCSS( this, "marginBottom", true ) ) || 0,
( parseInt( $.curCSS( this, "marginBottom", true ) ) || 0 ),
position = $.extend( {}, basePosition ),
collisionPosition;

Expand Down

0 comments on commit c1cc00f

Please sign in to comment.