Skip to content

Commit

Permalink
Merge "[ui] Fix bug where Ctrl+Shift+P doesn't work on initial load."…
Browse files Browse the repository at this point in the history
… into main
  • Loading branch information
stevegolton authored and Gerrit Code Review committed Sep 1, 2023
2 parents 0042727 + 76b7580 commit 70c526c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ui/src/frontend/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ export class App implements m.ClassComponent {
private omniboxInputEl?: HTMLInputElement;
private recentCommands: string[] = [];

constructor() {
const unreg = globals.commandManager.registerCommandSource(this);
this.trash.add(unreg);
}

private enterCommandMode(): void {
this.omniboxMode = OmniboxMode.Command;
this.resetOmnibox();
Expand Down Expand Up @@ -553,9 +558,6 @@ export class App implements m.ClassComponent {
}

oncreate({dom}: m.VnodeDOM) {
const unreg = globals.commandManager.registerCommandSource(this);
this.trash.add(unreg);

this.updateOmniboxInputRef(dom);
this.maybeFocusOmnibar();
}
Expand Down

0 comments on commit 70c526c

Please sign in to comment.