Skip to content

Commit

Permalink
draggable,sortable: if the offset parent is the body, top/left values…
Browse files Browse the repository at this point in the history
… should always be normalized to 0 (fixes #4141 - margin on body in safari caused bump)
  • Loading branch information
Paul Bakaus committed Feb 13, 2009
1 parent 03f63d3 commit e0f3b0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/ui.draggable.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
po.top += this.scrollParent.scrollTop(); po.top += this.scrollParent.scrollTop();
} }


if((this.offsetParent[0] == document.body && $.browser.mozilla) //Ugly FF3 fix if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
|| (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix
po = { top: 0, left: 0 }; po = { top: 0, left: 0 };


Expand Down
2 changes: 1 addition & 1 deletion ui/ui.sortable.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
po.top += this.scrollParent.scrollTop(); po.top += this.scrollParent.scrollTop();
} }


if((this.offsetParent[0] == document.body && $.browser.mozilla) //Ugly FF3 fix if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
|| (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix
po = { top: 0, left: 0 }; po = { top: 0, left: 0 };


Expand Down

0 comments on commit e0f3b0e

Please sign in to comment.