Radix UI elements not triggering on mobile (specifically iPhones) #7613
Replies: 1 comment 3 replies
-
Hi @shadeemerhi did you ever find a fix for this issue? I've got a project with the same setup (shadcn) and I'm experiencing the same problem on my actual iPhone. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone,
I'm getting very strange behavior with my Radix UI (shadcd/ui) elements in my production app, but only on iPhone devices. When clicking the trigger buttons of Dialogs, Dropdown Menus, and Select Menus, the elements simply do not open (in both Safari and Chrome on iOS 17.0.2).
The elements behave 100% correctly on desktop, Andriods, as well as in the Chrome Mobile Developer Tools. I even ran the app in the XCode iPhone simulator and the elements are working totally fine there as well. It's strictly on real iPhone devices (both Safari and Chrome).
The two screen recordings below show the broken behaviour from my iPhone and the expected behaviour from the XCode iPhone simulator, respectively:
This seems like such an obscure issue and I'm not even sure if it's Remix specific, but based on what I've tried it seems to be some SSR/Hydration issue. I've tried using
ClientOnly
from Sergio'sremix-utils
package but that doesn't work.Has anyone seen anything like this before? Any help would be greatly appreciated. Please let me know if any additional information is required.
Here is my
root.tsx
file that's used in the video above and produces this issue:Package versions:
"@remix-run/dev": "^1.19.1"
"@radix-ui/react-dialog": "^1.0.4",
"@radix-ui/react-dropdown-menu": "^2.0.5",
"@radix-ui/react-select": "^1.2.2",
Beta Was this translation helpful? Give feedback.
All reactions