overflow:auto prevents dragging out of element
Posted: Sun Sep 17, 2006 12:20 am
I have a div where the overflow property is set to auto so that when I add elements as children that go beyond the y scale of the div, it scrolls. I'm making a little drag and drop application and when I drag one of the child elements out of the div (or at least try to), the element I'm dragging disappears behind other elements that are outside of my overflowed div.
when I change the overflow property to visible, the dragging works fine. As a workaround, I made it so that when you click an item to drag it outside of the div, it changes the property of the div to visible, there are two problems with that, one: when I try to drag an element for which I had to scroll, the dragging gets completely borked because the height of the element gets changed. two: it looks horrible when all of a sudden 10 more elements just appear as I'm dragging out.
I know this probably doesn't make a whole lot of sense without seeing it applied, but I can't really show what I'm doing for this particular application. If any of you have run across this, but more importantly, have run across a solution, I'd be very grateful to hear it.
when I change the overflow property to visible, the dragging works fine. As a workaround, I made it so that when you click an item to drag it outside of the div, it changes the property of the div to visible, there are two problems with that, one: when I try to drag an element for which I had to scroll, the dragging gets completely borked because the height of the element gets changed. two: it looks horrible when all of a sudden 10 more elements just appear as I'm dragging out.
I know this probably doesn't make a whole lot of sense without seeing it applied, but I can't really show what I'm doing for this particular application. If any of you have run across this, but more importantly, have run across a solution, I'd be very grateful to hear it.