Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
Fix: Navigation hotkeys in quickOpen menu starts working after small …
Browse files Browse the repository at this point in the history
…delay (fixes #49765)
  • Loading branch information
chrmarti committed May 14, 2018
1 parent c43c862 commit 67850ce
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/vs/workbench/browser/parts/quickopen/quickOpenController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ export class QuickOpenController extends Component implements IQuickOpenService
private promisesToCompleteOnHide: ValueCallback[];
private previousActiveHandlerDescriptor: QuickOpenHandlerDescriptor;
private actionProvider = new ContributableActionProvider();
private visibilityChangeTimeoutHandle: number;
private closeOnFocusLost: boolean;
private editorHistoryHandler: EditorHistoryHandler;

Expand Down Expand Up @@ -439,19 +438,11 @@ export class QuickOpenController extends Component implements IQuickOpenService
}

private emitQuickOpenVisibilityChange(isVisible: boolean): void {
if (this.visibilityChangeTimeoutHandle) {
window.clearTimeout(this.visibilityChangeTimeoutHandle);
if (isVisible) {
this._onShow.fire();
} else {
this._onHide.fire();
}

this.visibilityChangeTimeoutHandle = setTimeout(() => {
if (isVisible) {
this._onShow.fire();
} else {
this._onHide.fire();
}

this.visibilityChangeTimeoutHandle = void 0;
}, 100 /* to prevent flashing, we accumulate visibility changes over a timeout of 100ms */);
}

public show(prefix?: string, options?: IShowOptions): TPromise<void> {
Expand Down

0 comments on commit 67850ce

Please sign in to comment.