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
[useScrollLock] cause enexpected behavior on Safari besides other browsers #2278
Comments
Ran into the same bug with a current project. The modal that should be scrollable can’t be scrolled, as soon as the body scroll is locked. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I have the same issue |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
For me this works now since #2699 |
Describe the bug
when in Chrome based browers, the
useScrollLock
only lock that elementwhen in safari, the
useScrollLock
locks elment and any elements in it.I think this should be consider as a bug, and if this is not fixable, I do think we'd better add some warnings in docs.
Related to #1558
My case is that I am locking body to prevent page scroll, while trying to like an fix modal be able to scroll.
I am building a feature extactly like vitepress. See NavScreen Component:
This
NavScreen
component will lock body scroll, and try to let the modal scrollable. And vitepress itself is not using@vueuse
, instead it usebody-scroll-lock
package. (See: https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/components/VPNavScreen.vue)While I am trying to build a similar layout with
useScrollLock
, I am getting the same behavior with Chrome. But on Safari, the NavScreen Component is not scrollable:You can try https://vuepress-theme-hope.github.io/v2/
I am sure the issue only appears in safari, and:
useScrollLock
has same issues on Safaribody-scroll-lock
in my theme works well on Safari like vitepress default themeI can provide a real "minimal reproduction" and system info if you do need this.
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: