Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: return focus to least recently active tab #10533 #10685

Merged
merged 3 commits into from
Jan 31, 2022

Conversation

alxflam
Copy link
Contributor

@alxflam alxflam commented Jan 28, 2022

What it does

Fixes #10533: When the last tab of a TabBar is closed, always the last tab of the previous TabBar is activated.
This behavior differs from VSCode - the previously opened tab stays open.

10533_issue.mp4

How to test

  • Open three files
  • Move one file into a separate TabBar to the right
  • Activate the leftmost tab in the first TabBar, then then single tab in the right TabBar
  • Then close the single tab in the right TabBar
  • Expected: The least recently activated tab is activated (displayed) in the first TabBar
10533_fixed.mp4

Review checklist

Reminder for reviewers

I couldn't spot any existing tests regarding the TabBar behavior - if i have missed them, please let me know. Locally my tests are passing for the core package.

Signed-off-by: Alexander Flammer <alex.flammer.dev@outlook.com>
@colin-grant-work colin-grant-work added bug bugs found in the application shell issues related to the core shell labels Jan 28, 2022
Copy link
Contributor

@colin-grant-work colin-grant-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me, and now the active tab is not changed when reverting to a previously active tabbar. 👍

@colin-grant-work colin-grant-work merged commit b00dc83 into eclipse-theia:master Jan 31, 2022
@JonasHelming JonasHelming added this to the 1.23.0 milestone Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application shell issues related to the core shell
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Closing a split editor tab, focus is not returned to the right tab
3 participants