Skip to content
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

fix(suggest): check for refObject or callback on popup interaction #4147

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(suggest): check for refObject or callback on popup interaction
  • Loading branch information
tanmoyopenroot committed May 23, 2020
commit c79ca09e8496fcc29f5cc8ef0807bf400cfbb95c
2 changes: 1 addition & 1 deletion packages/select/src/components/select/suggest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export class Suggest<T> extends React.PureComponent<ISuggestProps<T>, ISuggestSt

private handlePopoverInteraction = (nextOpenState: boolean) =>
requestAnimationFrame(() => {
if (this.inputEl != null && this.inputEl !== document.activeElement) {
if (this.inputEl != null && getRef<HTMLInputElement>(this.inputEl) !== document.activeElement) {
// the input is no longer focused so we can close the popover
this.setState({ isOpen: false });
}
Expand Down