-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[SelectionAutoCompleteInput] Fix clicking on auto-complete result. #26844
Conversation
Deploy preview for dagit-core-storybook ready! ✅ Preview Built with commit 4f07f14. |
if (document.body.querySelector('.CodeMirror-hints')) { | ||
// Hints already visible | ||
return; | ||
} |
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.
I could future proof this a bit by specifying a custom container for the hints... in case we ever render multiple of these inputs on the same page and specify closeOnUnfocuse: false
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.
Hm, yeah. I could see there being more than one of these on a page.
if (document.body.querySelector('.CodeMirror-hints')) { | ||
// Hints already visible | ||
return; | ||
} |
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.
Hm, yeah. I could see there being more than one of these on a page.
…fix-clicking-result
…fix-clicking-result
Summary & Motivation
Clicking on a result was broken because our focus handler would cause us to call
showHint
again which would cause the completion to be thrown out. To fix this guard against calling showHint again if hints are already visible.