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

Commit

Permalink
Merge pull request #498 from janodvarko/issue471
Browse files Browse the repository at this point in the history
Issue 471 - fix position of context sub-menu
  • Loading branch information
janodvarko committed Jul 13, 2017
2 parents 350d8e2 + e9e2265 commit 8b0e606
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/devtools-contextmenu/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ function createSubMenu(subItems) {
function showSubMenu(subMenu, menuItemNode, popup) {
if (subMenu) {
let subMenuNode = menuItemNode.querySelector("menupopup");
let { left, top, width } = popup.getBoundingClientRect();
let { top } = menuItemNode.getBoundingClientRect();
let { left, width } = popup.getBoundingClientRect();
subMenuNode.style.setProperty("left", `${left + width}px`);
subMenuNode.style.setProperty("top", `${top}px`);

Expand Down

0 comments on commit 8b0e606

Please sign in to comment.