-
Notifications
You must be signed in to change notification settings - Fork 37.3k
Disable tooltips for Quick Input to prevent obscuring dropdown result (fix #285927) #286181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @bpaseroMatched files:
|
| input.ariaAutoComplete = 'list'; | ||
|
|
||
| // Hide tooltip when user starts typing to prevent obscuring dropdown results | ||
| this._register(dom.addDisposableListener(input, dom.EventType.KEY_DOWN, () => { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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, () => { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Disable tooltips for Quick Input to prevent obscuring dropdown result (fix #285927)