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

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

2 participants