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

closeOnOutsideClick does not work on mobile Safari #192

Open
zainkhalid opened this issue Jan 10, 2018 · 0 comments
Open

closeOnOutsideClick does not work on mobile Safari #192

zainkhalid opened this issue Jan 10, 2018 · 0 comments

Comments

@zainkhalid
Copy link

It looks like there's an issue with closeOnOutsideClick where clicking outside the portal on mobile Safari does not close the portal. I have the issue reproduced here: https://codesandbox.io/s/4w12r3jq0x

From my understanding, it seems related to the behavior of mobile Safari described here, where the click event doesn't bubble up from all DOM elements.

A simple fix would be to also add an event listener for the touchstart event here but from poking around the repo it seems like at some point you switched from using the mouseup and touchstart events to using the click event, so I'm not sure if this is the right approach to fix the issue. If you can provide me some guidance, I'd be more than happy to put in a PR to fix the issue.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant