diff options
author | Paul Bakaus <paul.bakaus@googlemail.com> | 2009-02-13 13:05:24 +0000 |
---|---|---|
committer | Paul Bakaus <paul.bakaus@googlemail.com> | 2009-02-13 13:05:24 +0000 |
commit | 39d164b95e79b4b1e56fe889b95bcce505fe857a (patch) | |
tree | 043b385e1fc0ebf432d0e1465cb0e4c2e58bffeb /ui | |
parent | 5030b578016918247627a4b0f5120f3915ba63d7 (diff) | |
download | jquery-ui-39d164b95e79b4b1e56fe889b95bcce505fe857a.tar.gz jquery-ui-39d164b95e79b4b1e56fe889b95bcce505fe857a.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) (removed redundant check)
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.draggable.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/ui.draggable.js b/ui/ui.draggable.js index 1692a136f..346755137 100644 --- a/ui/ui.draggable.js +++ b/ui/ui.draggable.js @@ -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 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' && !$.browser.safari ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) + + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -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 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' && !$.browser.safari ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) + + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) ) }; |