mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Fix tree drag & drop hover kept items highlighted, marked as selected
This commit is contained in:
parent
74fa7e6912
commit
3f08f38913
@ -43,6 +43,11 @@ export class EgwDragDropShoelaceTree extends egwActionObjectInterface{
|
||||
const target = this.findActionTargetHandler.findActionTarget(dom_event);
|
||||
if(egw_event == EGW_AI_DRAG_ENTER && !target.target.classList.contains("draggedOver"))
|
||||
{
|
||||
// Remove drag classes from all items
|
||||
this.tree.shadowRoot.querySelectorAll("sl-tree-item.draggedOver").forEach(n =>
|
||||
{
|
||||
n.classList.remove("draggedOver", "drop-hover");
|
||||
});
|
||||
target.target.classList.add("draggedOver", "drop-hover");
|
||||
this.timeouts[target.target.id] = setTimeout(() =>
|
||||
{
|
||||
|
@ -1227,10 +1227,10 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement) implements Fin
|
||||
action = this.widget_object.addObject(target.id, this.widget_object.iface)
|
||||
action.setSelected = (set) =>
|
||||
{
|
||||
target.selected = set;
|
||||
target.action_selected = set;
|
||||
this.widget_object.updateSelectedChildren(action, set);
|
||||
}
|
||||
action.getSelected = () => target.selected;
|
||||
action.getSelected = () => target.action_selected;
|
||||
// Required to get dropped accepted, but also re-binds
|
||||
action.updateActionLinks(this._get_action_links(this.actions));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user