kendo-react icon indicating copy to clipboard operation
kendo-react copied to clipboard

ListBox does not throw onDrop event if there are no items in it

Open kdikov82 opened this issue 3 years ago • 1 comments

When you drag&drop items from one ListBox to another, if the target ListBox does not have items, the onDrop event does not fire. This is due to the fact that the onDrop event fires either from a target item or from the container ("k-list-scroller"). However, the height of one of the nested elements is "inherit" and it expands over the entire "k-list-scroller" container and prevents the onDrop to ever be fired.

To replicate the problem:

  1. Open the example: https://stackblitz.com/edit/react-c53cvn?file=app%2Fmain.jsx
  2. Drag all items from one of the ListBox components and try to drag one item back to it

Expected behavior: User should be able to drag item in empty ListBox

Workaround (fix):

            <style>
            .k-listbox .k-list-scroller .k-list.k-list-md{
                height: auto;
                max-height: 100%;
            }   

https://stackblitz.com/edit/react-dtq4qp?file=app%2Fmain.jsx,index.html

kdikov82 avatar May 13 '22 22:05 kdikov82

Mentioned in Ticket ID: 1581945

WissamProgress avatar Oct 03 '22 10:10 WissamProgress

The issue is still reproducible with the latest version (5.11.0): https://stackblitz.com/edit/react-c53cvn-9x3xtg?file=app%2Fmain.jsx

kdikov82 avatar Feb 23 '23 12:02 kdikov82

Reported in Ticket ID: 1609527

WissamProgress avatar May 22 '23 11:05 WissamProgress

Also reported in Ticket ID: 1619795

WissamProgress avatar Aug 14 '23 12:08 WissamProgress

Fixed in dev version v7.0.0-develop.5

iadnonov avatar Nov 27 '23 13:11 iadnonov