aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorPaul Bakaus <paul.bakaus@googlemail.com>2009-02-13 12:26:44 +0000
committerPaul Bakaus <paul.bakaus@googlemail.com>2009-02-13 12:26:44 +0000
commite0f3b0ef32eccfbfe1bb333716ace8e656d993c0 (patch)
tree994ba3c0a833f4dbc2e7ca4b7731e60e424e3533 /ui
parent03f63d3a6b14ba65dfd1cd0513ab21c550c80020 (diff)
downloadjquery-ui-e0f3b0ef32eccfbfe1bb333716ace8e656d993c0.tar.gz
jquery-ui-e0f3b0ef32eccfbfe1bb333716ace8e656d993c0.zip
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)
Diffstat (limited to 'ui')
-rw-r--r--ui/ui.draggable.js2
-rw-r--r--ui/ui.sortable.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/ui/ui.draggable.js b/ui/ui.draggable.js
index 3946a3c36..b2825ca1d 100644
--- a/ui/ui.draggable.js
+++ b/ui/ui.draggable.js
@@ -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 };
diff --git a/ui/ui.sortable.js b/ui/ui.sortable.js
index a781ea531..aaf753245 100644
--- a/ui/ui.sortable.js
+++ b/ui/ui.sortable.js
@@ -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 };