Skip to content

Commit 28cdbe9

Browse files
authored
Merge pull request #320 from opf/fix/62976-two-menu-close
[62976] Two menus intefere with each other
2 parents bf9ea67 + e5df72a commit 28cdbe9

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

.changeset/brown-pets-bake.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@openproject/primer-view-components': patch
3+
---
4+
5+
Fix a bug to avoid that two menus interfere with each other

app/components/primer/alpha/action_menu/action_menu_element.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,10 @@ export class ActionMenuElement extends HTMLElement {
360360
// desirable
361361
this.#focusZoneStack.pop(subMenu)
362362
const item = this.#itemForSubMenu(subMenu)
363-
if (item) item.focus()
363+
const openPopover = document.querySelector(':popover-open')
364+
if (item && !openPopover) {
365+
item.focus()
366+
}
364367
}
365368
}
366369

0 commit comments

Comments
 (0)