Skip to content

Commit

Permalink
fix: make on first tab cycle back to last tab
Browse files Browse the repository at this point in the history
Before this commit, trying to cycle back to the previous tab, when you
were on the first tab had no action. The expected behaviour was to have
the last tab in focus. This was because trying to move back from the first
tab was thought to be an action of moving to the previous tab group. This
commit fixes that issue by treating it as a same tab group action, and
redirecting the user to the last tab in the same group.

Fixes #11746
  • Loading branch information
Pranav2612000 committed Oct 22, 2022
1 parent 7e753f4 commit 19a91d2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/core/src/browser/shell/application-shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1849,6 +1849,13 @@ export class ApplicationShell extends Widget {
}
return true;
} else if (ci === 0) {
if (current && current.titles.length > 0) {
current.currentIndex = current.titles.length - 1;
if (current.currentTitle) {
this.activateWidget(current.currentTitle.owner.id);
}
return true;
}
return this.activatePreviousTabBar(current);
}
}
Expand Down

0 comments on commit 19a91d2

Please sign in to comment.