This project is archived and is in readonly mode.

#28 ✓invalid
Olivier Couston

drag and sortables bug when inside a position:fixed element

Reported by Olivier Couston | March 26th, 2009 @ 01:23 AM

Ok, I know it's a rare case, but it's happening to me right now, I have a music player with a sortable playlist located in a fixed positioned header.

If the document's scroll position is 0 (so in other word, if at the top of the page) everything works fine, but as soon as you start scrolling down, if you use the sortables, things go out of hand. The reason is because the drag algorithm uses Event.page for mouse position, which works great in normal case. But for fixed element, it should use Event.client

The only fix I see for now is to replace "event.page" by "event[this.context]" and set the variable context at the beginning in the initialize function depending on the element's positioning. kinda ugly, but it should work... I think

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 »

The MooTools Extensions

People watching this ticket

Pages