You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whilst implementing a modal dialog using react-focus-on I have realised that the onClickOutside callback doesn't get triggered on iOS (possibly all touch devices?)
I have done some investigation and I saw that the lib attaches a click handler on the document in Effect.tsx (here).
However, after some investigation, it appears iOS doesn't trigger any click events on nodes unless they "look" clickable (see this comment).
I have a fix for it (basically attaching a touchstart handler on top of the click handler).
I will send you a PR and we can continue the discussion there.
✌️
The text was updated successfully, but these errors were encountered:
Hi @theKashey,
Whilst implementing a modal dialog using
react-focus-on
I have realised that theonClickOutside
callback doesn't get triggered on iOS (possibly all touch devices?)I have done some investigation and I saw that the lib attaches a
click
handler on thedocument
in Effect.tsx (here).However, after some investigation, it appears iOS doesn't trigger any
click
events on nodes unless they "look" clickable (see this comment).I have a fix for it (basically attaching a
touchstart
handler on top of theclick
handler).I will send you a PR and we can continue the discussion there.
✌️
The text was updated successfully, but these errors were encountered: