Drag 'n' Drop in scrolling div results in invalid drop
I came across an issue which I thought would be pretty common, but surprisingly, google and the search of this forum turned up nothing.
Soo.. the problem is that dropping in a scrolling div (css: overflow: scroll; ) doesn't work as expected.
I added the drag element to the div and dropping in its visible area works just fine, but as soon as I drop it outside that area (so that one would first have to scroll to see it), it results in an invalid drop even if it's still in the drop-target-div
To better show what I mean:
Now, how do I fix that without just making everything a drop target or redirecting onInvalidDrop to onDragDrop (which would be ugly)?
A running example of the problem is attached (just set <path to extjs> in the header of the html)
A related problem which is not that important but I'll ask anyway: Is there a way to restrict the drag proxy to the div in a way that scrolling is supported? When I use DDProxy.constrainTo(the_div);, it blocks at the top and the left, as it should, but also at the right and the bottom where it should scroll..
I now manually stretched the div by adding a 1px-inner-div at position 10000x1000 and converted that to Ext: http://blog.davglass.com/files/yui/dd15/ This works, but is just a workaround, so if someone would know a proper way (so I still could have an "expanding on demand" scrolling div instead of one with a fixed size), I would appreciate it
This doesn't seem to change anything for me, sadly, I still get invalid drops for everything inside the div but outside the view.
I'm actually not quite sure what your code is supposed to do...
Thanks anyway. I think I continue to use the other solution.