From 79051a69dbd622500c32e649bfd0e93da5d7185a Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Wed, 31 Aug 2022 15:00:45 +0000 Subject: [PATCH] fix: context menu not working (#6399) --- core/menu.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/menu.ts b/core/menu.ts index f5c46e076fc..a3b316a37e6 100644 --- a/core/menu.ts +++ b/core/menu.ts @@ -210,7 +210,7 @@ export class Menu { if (dom.hasClass(currentElement, 'blocklyMenuItem')) { // Having found a menu item's div, locate that menu item in this menu. for (let i = 0, menuItem; menuItem = this.menuItems_[i]; i++) { - if (menuItem.getElement() === elem) { + if (menuItem.getElement() === currentElement) { return menuItem; } }