Item12632: error in upstream ui-draggable using firefox

pencil
Priority: Urgent
Current State: Closed
Released In: 1.1.9
Target Release: patch
Applies To: Extension
Component: JQueryPlugin
Branches: Release01x01
Reported By: MichaelDaum
Waiting For:
Last Change By: GeorgeClark
The offset of a draggable element is wrong using firefox. So when scrolling down a page and grabbing a draggable element the element suddenly jumbs down, i.e. it does not stick to the mouse pointer. That's because firefox reports an additional scroll offset to the top of the document where chrome does not. Actually firefox is right in doing so, but the rest of the maths in this module don't seem to account for it ... as far as I read the code.

--- pub/System/JQueryPlugin/ui/jquery.ui.draggable.js   (revision 17040)
+++ pub/System/JQueryPlugin/ui/jquery.ui.draggable.js   (working copy)
@@ -534,7 +534,7 @@
                                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)
-                               ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top )
+                               ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : 0 /*this.offset.scroll.top*/ ) /* chrome returns a zero, firefox the correct scroll.top ... which however disturbs the arithmetics */
                        ),
                        left: (
                                pageX -  

-- MichaelDaum - 05 Nov 2013

 

ItemTemplate edit

Summary error in upstream ui-draggable using firefox
ReportedBy MichaelDaum
Codebase 1.1.8, trunk
SVN Range
AppliesTo Extension
Component JQueryPlugin
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:acf366748aeb distro:cde98793cc87
TargetRelease patch
ReleasedIn 1.1.9
CheckinsOnBranches Release01x01
trunkCheckins
Release01x01Checkins distro:acf366748aeb distro:cde98793cc87
Topic revision: r3 - 19 Nov 2013, GeorgeClark - This page was cached on 05 Dec 2016 - 03:42.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License