Ticket #3875 (closed defect: worksforme)

Opened 18 months ago

Last modified 18 months ago

Drag and drop between scrollable lists, where one list is above the other

Reported by: guest Owned by: elazutkin
Priority: normal Milestone: 0.9
Component: DnD Version: 0.4.2rc1
Severity: normal Keywords: drag and drop overlapping div
Cc: sbarkdull@…

Description

To reproduce:

Create 2 scrolling lists "controls", where one is positioned above the other. The list controls should be constructed using div elements with overflow-y set to "auto", and the list should be implemented as a table inside of the div tag. The div tag must have its style.height set to a value that will cause it to scroll. SOmething like:

<table border='1px' style='width:30%'>

<tr>

<td>

<table border='1px' style='width:200px' class='container_inset_open'>

<tr>

<td id='list1Containerxx' style="width:200px;height:100px" class="container_content">

<div style='overflow-y:auto;height:100px'>

<table style='height:100px'>

<tr><td>xxxx</td></tr> <tr><td>xxxx</td></tr> <tr><td>xxxx</td></tr> <tr><td>xxxx</td></tr> <tr><td>xxxx</td></tr> <tr><td>xxxx</td></tr> <tr><td>xxxx</td></tr> <tr><td>xxxx</td></tr> <tr><td>xxxx</td></tr> <tr><td>xxxx</td></tr> <tr><td>xxxx</td></tr> <tr><td>xxxx</td></tr> <tr><td>xxxx</td></tr> <tr><td>xxxx</td></tr> <tr><td>xxxx</td></tr>

</table>

</div>

</td>

</tr>

</table>

</td>

</tr> <tr>

<td>

<table border='1px' style='width:200px' class='container_inset_open'>

<tr>

<td id='list1Containerxx' style="width:200px;height:100px" class="container_content">

<div style='overflow-y:auto;height:100px'>

<table style='height:100px'>

<tr><td>bart</td></tr> <tr><td>bart</td></tr> <tr><td>bart</td></tr> <tr><td>bart</td></tr> <tr><td>bart</td></tr> <tr><td>bart</td></tr> <tr><td>bart</td></tr> <tr><td>bart</td></tr> <tr><td>bart</td></tr> <tr><td>bart</td></tr> <tr><td>bart</td></tr> <tr><td>bart</td></tr> <tr><td>bart</td></tr> <tr><td>bart</td></tr> <tr><td>bart</td></tr>

</table>

</div>

</td>

</tr>

</table>

</td>

</tr>

</table>

The lists must have more items in them than are visible, so that the hidden portion of the scolled div element of one list is over lapping with the hidden portion of the div element of the other list. elements that are registered as drop targets first seem to be more likely to work properly.

After reading some of the DND code, it appears that the intersection tests on the bounding boxes while looking for the current drop target (or drag over target) does not consider the z-order of the target. So the target that was registered first will get the drop event.

This issue seems to exist in both the .4.X and .9 code lines.

Feel free to contact me at sbarkdull@…

Change History

Changed 18 months ago by elazutkin

  • priority changed from highest to normal
  • status changed from new to assigned
  • severity changed from blocker to normal

Could you attach an example, which demonstrates the problem with Dojo 0.9? dojo/tests/dnd/flickr_viewer.html uses divs in similar fashion, but I could not reproduce your problem.

Changed 18 months ago by elazutkin

  • milestone set to 0.9

Changed 18 months ago by elazutkin

(In [9939]) Minor cleanup. Refs #3875.

Changed 18 months ago by elazutkin

  • status changed from assigned to closed
  • resolution set to worksforme

I cannot reproduce it. If you have a reproducible example for Dojo 0.9, please attach it, and reopen the ticket.

Note: See TracTickets for help on using tickets.