Changeset 2074

Show
Ignore:
Timestamp:
02/13/09 04:42:42 (13 months ago)
Author:
paul.bakaus
Message:

draggable: pageX/pageY already do not include scroll offsets in safari, therefore it does not need to be substracted again (fixes #4142)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ui/ui.draggable.js

    r2073 r2074  
    300300                                + this.offset.relative.top * mod                                                                                // Only for relative positioned nodes: Relative offset from element to offset parent 
    301301                                + this.offset.parent.top * mod                                                                                  // The offsetParent's offset without borders (offset + border) 
    302                                 - ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod 
     302                                - ($.browser.safari ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) 
    303303                        ), 
    304304                        left: ( 
     
    306306                                + this.offset.relative.left * mod                                                                               // Only for relative positioned nodes: Relative offset from element to offset parent 
    307307                                + this.offset.parent.left * mod                                                                                 // The offsetParent's offset without borders (offset + border) 
    308                                 - ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod 
     308                                - ($.browser.safari ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) 
    309309                        ) 
    310310                }; 
     
    357357                                - this.offset.relative.top                                                                                              // Only for relative positioned nodes: Relative offset from element to offset parent 
    358358                                - this.offset.parent.top                                                                                                // The offsetParent's offset without borders (offset + border) 
    359                                 + ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) 
     359                                + ($.browser.safari ? 0 : ( this.cssPosition == 'fixed' && !$.browser.safari ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) 
    360360                        ), 
    361361                        left: ( 
     
    364364                                - this.offset.relative.left                                                                                             // Only for relative positioned nodes: Relative offset from element to offset parent 
    365365                                - this.offset.parent.left                                                                                               // The offsetParent's offset without borders (offset + border) 
    366                                 + ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) 
     366                                + ($.browser.safari ? 0 : ( this.cssPosition == 'fixed' && !$.browser.safari ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) 
    367367                        ) 
    368368                };