diff --git a/src/vs/base/browser/ui/findinput/findInput.ts b/src/vs/base/browser/ui/findinput/findInput.ts index 2518cf4250d23..80f9fea1f8792 100644 --- a/src/vs/base/browser/ui/findinput/findInput.ts +++ b/src/vs/base/browser/ui/findinput/findInput.ts @@ -43,6 +43,7 @@ export interface IFindInputOptions { readonly inputBoxStyles: IInputBoxStyles; readonly history?: IHistory; readonly hoverLifecycleOptions?: IHoverLifecycleOptions; + readonly hideHoverOnValueChange?: boolean; } const NLS_DEFAULT_LABEL = nls.localize('defaultLabel', "input"); @@ -118,7 +119,8 @@ export class FindInput extends Widget { inputBoxStyles: options.inputBoxStyles, history: options.history, actions: options.actions, - actionViewItemProvider: options.actionViewItemProvider + actionViewItemProvider: options.actionViewItemProvider, + hideHoverOnValueChange: options.hideHoverOnValueChange })); if (this.showCommonFindToggles) { diff --git a/src/vs/base/browser/ui/inputbox/inputBox.ts b/src/vs/base/browser/ui/inputbox/inputBox.ts index 3438890dd233b..9b55cd2ec683c 100644 --- a/src/vs/base/browser/ui/inputbox/inputBox.ts +++ b/src/vs/base/browser/ui/inputbox/inputBox.ts @@ -40,6 +40,7 @@ export interface IInputOptions { readonly actionViewItemProvider?: IActionViewItemProvider; readonly inputBoxStyles: IInputBoxStyles; readonly history?: IHistory; + readonly hideHoverOnValueChange?: boolean; } export interface IInputBoxStyles { @@ -569,6 +570,10 @@ export class InputBox extends Widget { if (this.state === 'open' && this.contextViewProvider) { this.contextViewProvider.layout(); } + + if (this.options.hideHoverOnValueChange) { + getBaseLayerHoverDelegate().hideHover(); + } } private updateMirror(): void { diff --git a/src/vs/platform/quickinput/browser/quickInputBox.ts b/src/vs/platform/quickinput/browser/quickInputBox.ts index 0ecb0371795e2..8fdb053e956da 100644 --- a/src/vs/platform/quickinput/browser/quickInputBox.ts +++ b/src/vs/platform/quickinput/browser/quickInputBox.ts @@ -34,7 +34,8 @@ export class QuickInputBox extends Disposable { label: '', inputBoxStyles, toggleStyles, - actionViewItemProvider: createToggleActionViewItemProvider(toggleStyles) + actionViewItemProvider: createToggleActionViewItemProvider(toggleStyles), + hideHoverOnValueChange: true })); const input = this.findInput.inputBox.inputElement; input.role = 'textbox';