You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some situations I return false from the dragStart callback, to prevent dragging.
If the user tries to drag multiple nodes, the counter badge still shows up, and remains
visible after the drag have been cancelled.
The text was updated successfully, but these errors were encountered:
I have created a plunk to demonstrate the issue: https://plnkr.co/edit/dHTMlOJF46f8RSHrijrM
If you select two nodes and drag them, you will see the counter badge, although the drag is blocked by dragStart.
Notes:
Temporary fix: manually removing the badge (line 32 in plunk): $(node.span).find('.fancytree-childcounter').remove();
dragEnd is not fired, because the drag is blocked. Looking at the source code at dist/jquery.fancytree-all-deps.js, line 9594, I see that dragEnd is responsible for removing the badge:
case "dragend":
_clearGlobals();
// data.dropEffect = dropEffect;
data.isCancelled = dropEffect === "none";
$dropMarker.hide();
// Take this badge off of me - I can't use it anymore:
if ($extraHelper) {
$extraHelper.remove();
$extraHelper = null;
}
dndOpts.dragEnd(node, data);
break;
I'm using:
jquery 3.4.1
fancytree from dist/jquery.fancytree-all-deps.js, version 2.30.2
css from dist/skin-win8/ui.fancytree.css, version 2.30.2
Thank you for making up a sample.
I saw the problem there, and was not able to reproduce it with the latest code: the badge is not created when dragStart returns false. In this case also dragEnd is not called.
So I assume it is fixed with 2.31. It will be released the next days. Please re-openthis issue if it is not fix it for you then.
In some situations I return
false
from thedragStart
callback, to prevent dragging.If the user tries to drag multiple nodes, the counter badge still shows up, and remains
visible after the drag have been cancelled.
The text was updated successfully, but these errors were encountered: