-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Autocomplete: fix double popover #32988
Conversation
Size Change: -1 B (0%) Total Size: 1.04 MB
ℹ️ View Unchanged
|
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.
This solves the problem described in #32986. A 👍 from me. Thanks for the quick fix!
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.
This tests well! Thanks!
|
||
return { | ||
listBoxId, | ||
activeId, | ||
onKeyDown: handleKeyDown, | ||
popover: AutocompleterUI && ( | ||
popover: hasSelection && AutocompleterUI && ( |
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.
Could you elaborate a bit more (maybe in the PR description) on why adding this short-circuit here fixed the issue and/or what was in #31718 that introduced it, specifically?
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.
Sure. Added some more explanation.
The failing e2e test is unrelated, is has been failing for a while on other PRs (and |
The popover is rendered twice, once inside the rich text tag and once outside. One of the popovers is removed when rich text is deselected, but the other is not.
Cherry-picked to |
The popover is rendered twice, once inside the rich text tag and once outside. One of the popovers is removed when rich text is deselected, but the other is not.
The popover is rendered twice, once inside the rich text tag and once outside. One of the popovers is removed when rich text is deselected, but the other is not.
Description
Introduced in #31718. Fixes #32986.
The popover is rendered twice, once inside the rich text tag and once outside. One of the popovers is removed when rich text is deselected, but the other is not.
I removed the popover that is rendered outside the tag and added a condition (for selection) for the second popover that is rendered in the tag. In other words, previously there was an
isSelected
check, which is now missing.How has this been tested?
Screenshots
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).