Skip to content

Droppable: Make the undocumented refreshPositions option standard to recalculate positions. Fixed #5003 - Scroll on Droppable Demo Breaks Demo #296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ui/jquery.ui.droppable.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,9 @@ $.ui.ddmanager = {
},
drag: function(draggable, event) {

//If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event);
//Renders positions every time you move the mouse. Necessary when dragging causes scroll which gives the
//droppable negative positions that must be recalculated. (see ticket #5003)
$.ui.ddmanager.prepareOffsets(draggable, event);

//Run through all droppables and check their positions based on specific tolerance options
$.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
Expand Down