Skip to content

Conversation

@kborchers
Copy link
Member

Droppable: Check if scrolling while dragging and recalculate droppable positions. Fixes #5003 - Scroll on Droppable Demo Breaks Demo

…e positions. Fixes #5003 - Scroll on Droppable Demo Breaks Demo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't wrap this.element, it's already a jQuery object. Don't use .each() just to bind events, everything does implicit iteration.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work, you need to use this.scrolling directly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, it did seem to work in my tests in Chrome, FF, IE9 and IE6 but it also works using this.scrolling directly as well so I changed it.

@scottgonzalez
Copy link
Member

Ok, so I feel kinda bad for not noticing this before, but...

We'll need to bind on dragstart and unbind on dragstop, otherwise we won't be able to properly clean up the event handlers. This will require using a named function so we can unbind properly.

@kborchers
Copy link
Member Author

No problem. If I would have gotten it right the first time it wouldn't have been an issue. ;-)

Let me know how that commit looks.

@scottgonzalez
Copy link
Member

Drag methods don't exist on droppable. The methods are never called.

@kborchers
Copy link
Member Author

Sorry about that, I just noticed that my test was broken and was working no matter what I changed. I will rework this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants