Skip to content

Conversation

@MohamedEmirHajji
Copy link
Contributor

Disable tooltips for Quick Input to prevent obscuring dropdown result (fix #285927)

@vs-code-engineering
Copy link

vs-code-engineering bot commented Jan 6, 2026

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@bpasero

Matched files:

  • src/vs/base/browser/ui/findinput/findInput.ts
  • src/vs/base/browser/ui/inputbox/inputBox.ts

input.ariaAutoComplete = 'list';

// Hide tooltip when user starts typing to prevent obscuring dropdown results
this._register(dom.addDisposableListener(input, dom.EventType.KEY_DOWN, () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clean code, this should be handled by the input that Quick Pick takes advantage of and be a configuration option on that object upon creation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your review. I moved the logic to InputBox and added a boolean to the configuration called hideHoverOnKeyDown

this.onfocus(this.input, () => this.onFocus());

if (this.options.hideHoverOnKeyDown) {
this._register(dom.addDisposableListener(this.input, dom.EventType.KEY_DOWN, () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have an onValueChange function that runs when what is in the input changes. This feels like a good approximation without needing to add another event.

Additionally, rather than doing this, getBaseLayerHoverDelegate().hideHover(); we already have a this.hover.value which we could probably just dispose of instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep you are totally right about using onValueChange. About getBaseLayerHoverDelegate().hideHover();, while testing, I tried setting this.hover = undefined (using this.hover.clear()) but it didn't really made the hover disappear from the UI

readonly actionViewItemProvider?: IActionViewItemProvider;
readonly inputBoxStyles: IInputBoxStyles;
readonly history?: IHistory<string>;
readonly hideHoverOnKeyDown?: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last bit of feedback (I think). Let's change this to hideHoverOnValueChange since that is the actual event it is reacting to.

@TylerLeonhardt TylerLeonhardt added the ~copilot-video-please ⚠️WIP🏗️ Use in PRs. Runs Copilot CLI agent to record a video of "trying out the change" label Jan 9, 2026
@vs-code-engineering vs-code-engineering bot removed the ~copilot-video-please ⚠️WIP🏗️ Use in PRs. Runs Copilot CLI agent to record a video of "trying out the change" label Jan 9, 2026
@vs-code-engineering
Copy link

🤖 Copilot has tried out this change! Members of the team can view the recording here or download the Playwright trace here (run)

@TylerLeonhardt TylerLeonhardt enabled auto-merge (squash) January 9, 2026 22:00
@TylerLeonhardt TylerLeonhardt added the ~copilot-video-please ⚠️WIP🏗️ Use in PRs. Runs Copilot CLI agent to record a video of "trying out the change" label Jan 9, 2026
@vs-code-engineering vs-code-engineering bot removed the ~copilot-video-please ⚠️WIP🏗️ Use in PRs. Runs Copilot CLI agent to record a video of "trying out the change" label Jan 9, 2026
@vs-code-engineering
Copy link

🤖 Copilot has tried out this change! Members of the team can view the recording here or download the Playwright trace here (run)

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think this is a good compromise

@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 9, 2026
@TylerLeonhardt TylerLeonhardt merged commit 5091c35 into microsoft:main Jan 9, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix hover label on search box

3 participants