From 67e5eed0cb24e26ccffb11094b951527680d2db3 Mon Sep 17 00:00:00 2001 From: "Christian W. Damus" Date: Tue, 29 Aug 2023 05:18:45 -0400 Subject: [PATCH] tabbar: fix command contributions regression (#12869) The merge of #12799 introduced a regression in the rendering of MenuToolbarItems that aren't pop-up menus but instead just commands that happen to have a menu path: they were rendered as pop-up menus instead of simple buttons. This fix refines the condition for the new pop-up menu rendering to check that the menu to be rendered is not a command to be executed directly on click. Fixes #12687 Signed-off-by: Christian W. Damus --- .../core/src/browser/shell/tab-bar-toolbar/tab-bar-toolbar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/browser/shell/tab-bar-toolbar/tab-bar-toolbar.tsx b/packages/core/src/browser/shell/tab-bar-toolbar/tab-bar-toolbar.tsx index 53fbbda8698ca..e00dc47c51d3e 100644 --- a/packages/core/src/browser/shell/tab-bar-toolbar/tab-bar-toolbar.tsx +++ b/packages/core/src/browser/shell/tab-bar-toolbar/tab-bar-toolbar.tsx @@ -150,7 +150,7 @@ export class TabBarToolbar extends ReactWidget { return {this.renderMore()} {[...this.inline.values()].map(item => TabBarToolbarItem.is(item) - ? (MenuToolbarItem.is(item) ? this.renderMenuItem(item) : this.renderItem(item)) + ? (MenuToolbarItem.is(item) && !item.command ? this.renderMenuItem(item) : this.renderItem(item)) : item.render(this.current))} ; }