This project is archived and is in readonly mode.

#764 ✓resolved
Fábio M. Costa

getPosition(relative) with relative with borders

Reported by Fábio M. Costa | October 8th, 2009 @ 07:56 PM | in 1.3.0 rc2 (closed)

Border with is not being counted when you want to get the position of an element relative to another. The border from the element you pass as parameter should be subtracted to have the correct calculation.

To understand the bug slowly start the drag of one of 'li' elements. Youll notice that the "ghost" dragged element "jumps" 5px (the border width) to the right and to the bottom.

Ive created 1 mooshell with the bugged version:

http://mooshell.net/tbhGQ/

and another with the new fixed version:

http://mooshell.net/kJb5J/

Theres a gist too with the code so ppl can contribute on it (and still have code-highlight).

http://gist.github.com/205010

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Referenced by

Pages