Skip to content
This repository was archived by the owner on Sep 21, 2021. It is now read-only.

Commit 8b0e606

Browse files
authored
Merge pull request #498 from janodvarko/issue471
Issue 471 - fix position of context sub-menu
2 parents 350d8e2 + e9e2265 commit 8b0e606

File tree

1 file changed

+2
-1
lines changed
  • packages/devtools-contextmenu

1 file changed

+2
-1
lines changed

packages/devtools-contextmenu/menu.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ function createSubMenu(subItems) {
109109
function showSubMenu(subMenu, menuItemNode, popup) {
110110
if (subMenu) {
111111
let subMenuNode = menuItemNode.querySelector("menupopup");
112-
let { left, top, width } = popup.getBoundingClientRect();
112+
let { top } = menuItemNode.getBoundingClientRect();
113+
let { left, width } = popup.getBoundingClientRect();
113114
subMenuNode.style.setProperty("left", `${left + width}px`);
114115
subMenuNode.style.setProperty("top", `${top}px`);
115116

0 commit comments

Comments
 (0)