jQuery UI Widgets › Forums › Lists › ListBox › Drag/drop failure when return false from dragEnd
Tagged: drag, dragEnd, drop, jqxListBox, ListBox, return false
This topic contains 5 replies, has 2 voices, and was last updated by Dimitar 9 years, 11 months ago.
-
Author
-
I’ve found what looks like a bug.
My list box handles dragEnd, and returns false in certain conditions to prevent dropping.
If you drop on to the empty part of the listbox below the items, drag and drop subsequently becomes disabled.
Please see this fiddle for an example: http://jsfiddle.net/WRYpX/21/
Hello pguz,
Thank you for your feedback. We confirm this issue. As a workaround, you can try the following: http://jsfiddle.net/Dimitar_jQWidgets/78Lrsv7h/.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Thanks Dimitar. It’s not a great workaround as it means the drop cannot be rejected if dropItem is null.
It would be a big help if in future dropItem is set to be the listBox itself if dropping on the empty portion. Currently I cannot find a reliable way of determining the drop location if dropItem is null. Previous suggestions found on this forum include trying to figure out the drop target from the mouse co-ordinates (which I doubt is reliable) or comparing listbox item counts in dragStart and dragEnd (but they are always the same as the item doesn’t get added until after dragEnd!).
In addition, please provide a dropTarget property for the listbox. I doubt it would be hard to expose the underlying dropTarget property from jqxDragDrop.
Hi pguz,
Thank you for your suggestions. We will consider improving this functionality in the future. Please note, however, that the coordinate check is reliable, as demonstrated in the demo Drag & Drop.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Thanks Dimitar, I’ve used that code and it seems fine for now.
Of course, that does not address the ‘return false’ bug. We are using v3.5 – will there be a bug fix applied retrospectively to that version?
Paul
Hi Paul,
Fixes are introduced only in new versions. We always recommend using the latest version of jQWidgets for the best widget experience.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.