From a773d485d652d78e3ce72f8315cf778d45ad337c Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 26 Oct 2020 19:21:04 +0100 Subject: [PATCH] Firefox: avoid menu actions firing twice (#109374) * :lipstick: * fix #108621 --- src/vs/base/browser/ui/menu/menu.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vs/base/browser/ui/menu/menu.ts b/src/vs/base/browser/ui/menu/menu.ts index 9dd4ff50457..fd9f23467a8 100644 --- a/src/vs/base/browser/ui/menu/menu.ts +++ b/src/vs/base/browser/ui/menu/menu.ts @@ -448,9 +448,11 @@ class BaseMenuActionViewItem extends BaseActionViewItem { // In all other cases, set timout to allow context menu cancellation to trigger // otherwise the action will destroy the menu and a second context menu // will still trigger for right click. - setTimeout(() => { - this.onClick(e); - }, 0); + else { + setTimeout(() => { + this.onClick(e); + }, 0); + } })); this._register(addDisposableListener(this.element, EventType.CONTEXT_MENU, e => { -- GitLab