Skip to content

Commit

Permalink
tabbar: fix command contributions regression
Browse files Browse the repository at this point in the history
The merge of eclipse-theia#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 eclipse-theia#12687

Signed-off-by: Christian W. Damus <[email protected]>
  • Loading branch information
cdamus committed Aug 28, 2023
1 parent 4484f8d commit b702ee0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export class TabBarToolbar extends ReactWidget {
return <React.Fragment>
{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))}
</React.Fragment>;
}
Expand Down

0 comments on commit b702ee0

Please sign in to comment.