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
This is not unique to HeadlessUI, but a general feature of elements other than <body> receiving the scroll event. However, I'm asking here since it's not unreasonable to think that a other people have wanted to implement this as well.
I've tried to get some kind of swipe-to-refresh to work inside a dialog, but I've had no luck.
Another feature of scrolling inside a dialog is that the Safari address bar does not shrink nor expand. This means I have to insert my own 40px safe area on the bottom.
Would really appreciate if anyone has some magic tricks up their sleeve!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is not unique to HeadlessUI, but a general feature of elements other than
<body>
receiving the scroll event. However, I'm asking here since it's not unreasonable to think that a other people have wanted to implement this as well.I have a minimal vite + react sample repository here:
https://github.com/revosw/swipe-to-refresh-headlessui
To run it, simply
npm i && npm run dev --host
, then visit the page on your phone.screen-20240525-143801.mp4
I've tried to get some kind of swipe-to-refresh to work inside a dialog, but I've had no luck.
Another feature of scrolling inside a dialog is that the Safari address bar does not shrink nor expand. This means I have to insert my own 40px safe area on the bottom.
Would really appreciate if anyone has some magic tricks up their sleeve!
Beta Was this translation helpful? Give feedback.
All reactions