Skip to content

Commit

Permalink
tab selected should be adjacent when closing last one.
Browse files Browse the repository at this point in the history
fixes #13886

contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <rschnekenburger@eclipsesource.com>
  • Loading branch information
rschnekenbu committed Jul 11, 2024
1 parent 62476a0 commit 3085fa2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/core/src/browser/shell/application-shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1896,6 +1896,10 @@ export class ApplicationShell extends Widget {
if (index < current.titles.length - 1) {
return index + 1;
}
// last item in tab bar. select the previous one.
if (index === current.titles.length - 1) {
return index - 1;
}
return 0;
}

Expand Down

0 comments on commit 3085fa2

Please sign in to comment.