[popups] Fix touch openMethod when tapping outside element bounds on Safari#3541
Conversation
commit: |
Bundle size report
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
159b585 to
41c246e
Compare
LukasTy
left a comment
There was a problem hiding this comment.
The solution seems quite "expensive" for such edge-cases.
Do you think it's worth adding the extra event listener to solve this?
Would this ever resolve to anything other than touch in the fallback case?
Could we sneak in a plain || 'touch' fallback? 🥷 🙈 😆
It is indeed more expensive than I'd like. This seems like a decent solution, though the interaction type will never be |
475e796 to
9da19f5
Compare
LukasTy
left a comment
There was a problem hiding this comment.
Nice final solution. 👍
If we ever notice problems with this, a more robust solution could be explored.
I checked on Android, and at least on Chrome, it doesn't exhibit the same problem with empty openMethod when clicked in the "slop" area.
Should we limit the type value to account for this? 🤔 |
Since it doesn't happen on Android, we can limit this to iOS |
120bbd0 to
46619c0
Compare
openTypenot being"touch"ininitialFocuswhen tapping outside an element's bounds but inside the hitslop areaalignItemWithTriggernot being deactivated on touch when tapping outside the trigger's bounds but inside the hitslop area