Reputation: 6805
I'm having trouble manually scrolling of a scrollPanel. The picture below display 3 situations:
I have two side by side grids that I have manually made using tree and gwtqueryplugins because of drag and drop options and other stuff not worth explaining here.
I want to drag elements between grids.
On case (1) nothing is happening.
On case (2) I'm dragging an element from grid 2 (with name Teresa) over the element on grid 1 which becomes red.
So far everything works ok.
Now, on case(3) it's when I have trouble. When the panels indicated by the arrows, have a draggable over them, a scroll event is fired on the grid. After scrolling the grid, I want to drag my Paulo draggable over Cristina. But as you can see, Cristina is only hovered when Paulo is much below the actual position.
If I leave the browser page (causing a scroll to appear on the main page) and come back to "Cristina" it'll be ok. This makes me believe the HTML is not rendered until I finally drop the draggable element or when the page is forced to be re-rendered and therefore references the droppable object in its old position...
Watch here a video for a full understanding of the problem
Upvotes: 2
Views: 758
Reputation: 819
It looks like the scroll plugin doesn't handle your event when you manually scroll the area. However, it does handle the case when you drag out of the window.
Normally, it should re-initialize all droppables. As a workaround, you can do it manually - just after you scroll the area:
DragAndDropManager.getInstance().initialize(draggableLabel.getElement(), null);
Upvotes: 1