closeOnOutsideClick does not work on mobile Safari
zainkhalid opened this issue · 0 comments
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!