]> source.dussan.org Git - jquery-ui.git/commitdiff
draggable: pageX/pageY already do not include scroll offsets in safari, therefore...
authorPaul Bakaus <paul.bakaus@googlemail.com>
Fri, 13 Feb 2009 13:05:24 +0000 (13:05 +0000)
committerPaul Bakaus <paul.bakaus@googlemail.com>
Fri, 13 Feb 2009 13:05:24 +0000 (13:05 +0000)
ui/ui.draggable.js

index 1692a136f1431d803b8f21168c1b2dc60290656c..3467551371776f6987afd54b9ebe769cc1d1775b 100644 (file)
@@ -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() ))
                        )
                };