-
Notifications
You must be signed in to change notification settings - Fork 47
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(highlight): Remove selection when clicking anywhere outside of popup #615
Conversation
mxiao6
commented
Oct 3, 2020
•
edited
Loading
edited
- Unit tests
- Cross-browser testing
143c15e
to
b2c7e2f
Compare
@@ -54,8 +58,11 @@ export default function PopupHighlightError({ shape }: Props): JSX.Element { | |||
}), | |||
}; | |||
|
|||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | |||
useOutsideEvent('mousedown', popupRef.current?.popupRef!, onCancel); |
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.
Doesn't useOutsideEvent already expect a
RefObject? Or is this to get at the underlying
HTMLElement`
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.
Yeah, it needs the underlying HTMLElement.
b2c7e2f
to
2c03131
Compare
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.
LGTM