mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
Fix tree drag & drop hover kept items highlighted, marked as selected
This commit is contained in:
parent
d8cbf88207
commit
b1ea628546
@ -43,6 +43,11 @@ export class EgwDragDropShoelaceTree extends egwActionObjectInterface{
|
|||||||
const target = this.findActionTargetHandler.findActionTarget(dom_event);
|
const target = this.findActionTargetHandler.findActionTarget(dom_event);
|
||||||
if(egw_event == EGW_AI_DRAG_ENTER && !target.target.classList.contains("draggedOver"))
|
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");
|
target.target.classList.add("draggedOver", "drop-hover");
|
||||||
this.timeouts[target.target.id] = setTimeout(() =>
|
this.timeouts[target.target.id] = setTimeout(() =>
|
||||||
{
|
{
|
||||||
|
@ -1311,10 +1311,10 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement) implements Fin
|
|||||||
action = this.widget_object.addObject(target.id, this.widget_object.iface)
|
action = this.widget_object.addObject(target.id, this.widget_object.iface)
|
||||||
action.setSelected = (set) =>
|
action.setSelected = (set) =>
|
||||||
{
|
{
|
||||||
target.selected = set;
|
target.action_selected = set;
|
||||||
this.widget_object.updateSelectedChildren(action, 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
|
// Required to get dropped accepted, but also re-binds
|
||||||
action.updateActionLinks(this._get_action_links(this.actions));
|
action.updateActionLinks(this._get_action_links(this.actions));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user