aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.draggable.js
diff options
context:
space:
mode:
authorPaul Bakaus <paul.bakaus@googlemail.com>2009-02-13 12:47:52 +0000
committerPaul Bakaus <paul.bakaus@googlemail.com>2009-02-13 12:47:52 +0000
commit5030b578016918247627a4b0f5120f3915ba63d7 (patch)
tree0764f28f3b713da445a7bc7ff9efc0dfb8a41df9 /ui/ui.draggable.js
parent8623a3e9a5ec21a9a165a3dd85c099e6ce71566b (diff)
downloadjquery-ui-5030b578016918247627a4b0f5120f3915ba63d7.tar.gz
jquery-ui-5030b578016918247627a4b0f5120f3915ba63d7.zip
draggable: pageX/pageY already do not include scroll offsets in safari, therefore it does not need to be substracted again (fixes #4142) (only if css position is fixed)
Diffstat (limited to 'ui/ui.draggable.js')
-rw-r--r--ui/ui.draggable.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/ui.draggable.js b/ui/ui.draggable.js
index b6554acb4..1692a136f 100644
--- a/ui/ui.draggable.js
+++ b/ui/ui.draggable.js
@@ -299,13 +299,13 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
pos.top // The absolute mouse position
+ this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
- - ($.browser.safari ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
+ - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
),
left: (
pos.left // The absolute mouse position
+ this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
- - ($.browser.safari ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
+ - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
)
};
@@ -356,14 +356,14 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
- this.offset.click.top // Click offset (relative to the element)
- this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top // The offsetParent's offset without borders (offset + border)
- + ($.browser.safari ? 0 : ( this.cssPosition == 'fixed' && !$.browser.safari ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
+ + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' && !$.browser.safari ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
),
left: (
pageX // The absolute mouse position
- this.offset.click.left // Click offset (relative to the element)
- this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left // The offsetParent's offset without borders (offset + border)
- + ($.browser.safari ? 0 : ( this.cssPosition == 'fixed' && !$.browser.safari ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+ + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' && !$.browser.safari ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
)
};