Hidden tabs can no longer be clicked #9125
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #5199, Fixes #6100
What it does
This fixes #5199 and #6100, whereby clicking on the toolbar could trigger a switch to a tab hidden 'behind' the toolbar.
The issue arose because the phosphor.js tabbar event handler only looks at the coordinates of click events, so mustn't be called if the click event is outside the tabbar (but on the hidden tabbar overflow). However, the Theia tabbar click handler was originally passing all click events to the phosphor.js event handler. #5201 partially fixed this by filtering out clicks on the icon buttons, but failed to filter out clicks elsewhere in the toolbar.
How to test
Open enough tabs to overflow the space in the tab bar. Click on elements in the toolbar (including the output select menu and space around the edge of the toolbar).
Review checklist
Reminder for reviewers