mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
draggable,sortable: if the offset parent is the body, top/left values should always be normalized to 0 (fixes #4141 - margin on body in safari caused bump)
This commit is contained in:
parent
03f63d3a6b
commit
e0f3b0ef32
@ -221,7 +221,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
||||
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
|
||||
po = { top: 0, left: 0 };
|
||||
|
||||
|
@ -730,7 +730,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
|
||||
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
|
||||
po = { top: 0, left: 0 };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user