Skip to content

Commit

Permalink
actionBar: after a clear actions might be re-added to simply toggle s…
Browse files Browse the repository at this point in the history
…ome actions. We should preserve focus

fixes #97128
  • Loading branch information
isidorn committed Aug 14, 2020
1 parent 194db62 commit ae04039
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/vs/base/browser/ui/actionbar/actionbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ export class ActionBar extends Disposable implements IActionRunner {
index++;
}
});
if (this.focusedItem) {
// After a clear actions might be re-added to simply toggle some actions. We should preserve focus #97128
this.focus(this.focusedItem);
}
}

getWidth(index: number): number {
Expand Down

0 comments on commit ae04039

Please sign in to comment.