jQuery UI droppable outside the visible area of a jScrollpane catches drop event -
i have 2 adjacent jscrollpanes contain droppable li elements. first div above second (on y-axis), overflow top 1 flows "under" 1 below (both overflow:hidden). problem when drop draggable element lower jscrollpane, event caught droppable elements in both upper , lower, though element in upper outside of visible area of container.
how prevent "hidden" elements (those outside of scrollpane) catching drop event? i've tried inserting logic test if droppable :hidden or :visible, didn't work. playing z-index didn't work either. wanted delegate droppable() handler container, rather have on li, that's not supported.
i solved problem using this answer , modifying work jscrollpane. difference there 2 different parents need take consideration. size of "parent" referenced in other solution can gotten $(this).closest(".jspcontainer")
, need take account offset of viewable region. if you're scrolling vertically, offset parseint(#(this).closest(".jsppane").css("top")
.
Comments
Post a Comment