Skip to content

Commit

Permalink
tabbar: fix command contributions regression (#12869)
Browse files Browse the repository at this point in the history
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 <cdamus.ext@eclipsesource.com>
  • Loading branch information
cdamus authored Aug 29, 2023
1 parent 8f64a58 commit 67e5eed
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 67e5eed

Please sign in to comment.