mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-21 22:22:15 +01:00
Fix tree context menu on server-loaded branches
This commit is contained in:
parent
2c196d3419
commit
1e277b2460
@ -67,11 +67,30 @@ export class EgwDragDropShoelaceTree extends egwActionObjectInterface{
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(this.stateChangeContext)
|
||||
{
|
||||
const target = this.tree.shadowRoot.querySelector("[id='" + this.stateChangeContext.id + "']");
|
||||
|
||||
// Just set the attribute, we're not changing the tree value
|
||||
// The selected attribute will be reset by the tree next render()
|
||||
if(target && egwBitIsSet(_state, EGW_AO_STATE_SELECTED))
|
||||
{
|
||||
target.setAttribute("selected", "");
|
||||
}
|
||||
else if(target)
|
||||
{
|
||||
target.removeAttribute("selected");
|
||||
}
|
||||
if(target && egwBitIsSet(_state, EGW_AO_STATE_FOCUSED))
|
||||
{
|
||||
target.focus();
|
||||
}
|
||||
}
|
||||
|
||||
// Update the "focused" flag
|
||||
if(egwBitIsSet(_state, EGW_AO_STATE_FOCUSED))
|
||||
{
|
||||
this.tree.focusItem(this.id);
|
||||
this.tree.focus();
|
||||
}
|
||||
if(egwBitIsSet(_state, EGW_AO_STATE_SELECTED))
|
||||
{
|
||||
|
@ -314,7 +314,7 @@ export class EgwPopupActionImplementation implements EgwActionImplementation {
|
||||
event: e, posx: _xy.posx,
|
||||
posy: _xy.posy,
|
||||
innerText: nodeToUse?.title || _node.innerText,//nodeToUse only exists on widgets that define findActionTarget
|
||||
target: nodeToUse?.target || _node,
|
||||
target: nodeToUse || _node,
|
||||
};
|
||||
_callback.call(contextToUse || _context, _implContext, this);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user