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(highlight): Remove selection when clicking anywhere outside of popup #615

Merged
merged 4 commits into from
Oct 6, 2020

Conversation

mxiao6
Copy link
Contributor

@mxiao6 mxiao6 commented Oct 3, 2020

  • Unit tests
  • Cross-browser testing

@mxiao6 mxiao6 force-pushed the fix-popuphighlight branch from 143c15e to b2c7e2f Compare October 6, 2020 00:18
@@ -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);
Copy link
Contributor

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`

Copy link
Contributor Author

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.

@mxiao6 mxiao6 force-pushed the fix-popuphighlight branch from b2c7e2f to 2c03131 Compare October 6, 2020 16:54
@mxiao6 mxiao6 marked this pull request as ready for review October 6, 2020 17:36
@mxiao6 mxiao6 requested a review from a team as a code owner October 6, 2020 17:36
Copy link
Collaborator

@jstoffan jstoffan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mxiao6 mxiao6 merged commit 403d962 into box:master Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants