Skip to content

Commit 5091c35

Browse files
Disable tooltips for Quick Input to prevent obscuring dropdown result (fix #285927) (#286181)
* Disable tooltips for Quick Input to prevent obscuring dropdown results (fix #285927) * Handle tooltip visibility based on input state (fix #285927) * Hide tooltip when user starts typing (fix #285927) * Move logic to inputBox (fix #285927) * Move code to onValueChange (fix #285927) * rename hideHoverOnKeyDown to hideHoverOnValueChange (fix #285927)
1 parent 2dbfc69 commit 5091c35

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

src/vs/base/browser/ui/findinput/findInput.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export interface IFindInputOptions {
4343
readonly inputBoxStyles: IInputBoxStyles;
4444
readonly history?: IHistory<string>;
4545
readonly hoverLifecycleOptions?: IHoverLifecycleOptions;
46+
readonly hideHoverOnValueChange?: boolean;
4647
}
4748

4849
const NLS_DEFAULT_LABEL = nls.localize('defaultLabel', "input");
@@ -118,7 +119,8 @@ export class FindInput extends Widget {
118119
inputBoxStyles: options.inputBoxStyles,
119120
history: options.history,
120121
actions: options.actions,
121-
actionViewItemProvider: options.actionViewItemProvider
122+
actionViewItemProvider: options.actionViewItemProvider,
123+
hideHoverOnValueChange: options.hideHoverOnValueChange
122124
}));
123125

124126
if (this.showCommonFindToggles) {

src/vs/base/browser/ui/inputbox/inputBox.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export interface IInputOptions {
4040
readonly actionViewItemProvider?: IActionViewItemProvider;
4141
readonly inputBoxStyles: IInputBoxStyles;
4242
readonly history?: IHistory<string>;
43+
readonly hideHoverOnValueChange?: boolean;
4344
}
4445

4546
export interface IInputBoxStyles {
@@ -569,6 +570,10 @@ export class InputBox extends Widget {
569570
if (this.state === 'open' && this.contextViewProvider) {
570571
this.contextViewProvider.layout();
571572
}
573+
574+
if (this.options.hideHoverOnValueChange) {
575+
getBaseLayerHoverDelegate().hideHover();
576+
}
572577
}
573578

574579
private updateMirror(): void {

src/vs/platform/quickinput/browser/quickInputBox.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ export class QuickInputBox extends Disposable {
3434
label: '',
3535
inputBoxStyles,
3636
toggleStyles,
37-
actionViewItemProvider: createToggleActionViewItemProvider(toggleStyles)
37+
actionViewItemProvider: createToggleActionViewItemProvider(toggleStyles),
38+
hideHoverOnValueChange: true
3839
}));
3940
const input = this.findInput.inputBox.inputElement;
4041
input.role = 'textbox';

0 commit comments

Comments
 (0)