-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scroll not working anymore on iPhone after sidebar close #9669
Comments
Can confirm this is still a bug on the latest payload version Easy to reproduce open navbar select a different collection and you cannot scroll. |
This should be soon closed thannks to this commit: c7ad46c thanks to @jacobsfletch 🤞 |
Thanks for following up on this @n0mad-d3v. Yes this should get fixed in the next release when this change goes out. I meant to open a PR and link this issue but am moving too fast. Here's a breakdown of the fix: The |
Hey @jacobsfletch and thanks a lot for the explanation! I'm glad I succeeded to point out the issue, I'm sad I wasn't able to fix it, I'm super happy you fixed it and no worries for the issue link, the most important is that it'll be fixed! 🔥 Many many thanks 🙏 I'll keep an eye on the release of the 3.21.0 and close this issue as soon as it's out, so you don't have to care about it anymore 😜 Thanks again! |
Describe the Bug
Hi 👋 dear Payload team,
I'm opening this ticket for a not-so-important-but-quite-boring issue with the admin:
Issue
After changing the page from the sidebar (and closing it), the scroll stays locked on iPhone. We tested this issue on other devices (iPad, MacOS, Windows, Android) and it's fine, it's really iOS only. But it seems that all our clients are accessing their admin via their iPhone 😜
Workaround
If the user refreshed the page, then the scroll is
What I understood
I searched a bit already but not yet sure where it's coming from.
I think it comes from the fact that the scroll is locked on purpose when opening the sidebar here:
->
payload/packages/ui/src/elements/Nav/context.tsx
Line 78 in 877b899
And it seems that the
disableBodyScroll
method is not working properly? I saw it comes from this package https://github.com/willmcpo/body-scroll-lock but I am not sure it's maintained anymore.Do we really need the scroll to be locked when the sidebar is open?
What I didn't understood
I tried to fix that on my side but without any luck for now. Let me know if there is anything I can do!
Reproduction
The issue does happen on a new instance, created with
npx create-payload-app
I put a reproduction repo here: https://github.com/latte-macchiat-io/payloadcms-scroll-issue but it's really the state after the execution of the CLI.
You can also access the project here if it's easier for you to test with an iPhone:
Thanks a lot for your help,
And have a wonderful day ☀️
Link to the code that reproduces this issue
https://github.com/latte-macchiat-io/payloadcms-scroll-issue
Reproduction Steps
Which area(s) are affected? (Select all that apply)
area: ui
Environment Info
The text was updated successfully, but these errors were encountered: