Skip to content
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

Open a new page will lock the scroll of the old page #494

Closed
2 tasks done
awmleer opened this issue May 16, 2022 · 2 comments · Fixed by #495 or #496
Closed
2 tasks done

Open a new page will lock the scroll of the old page #494

awmleer opened this issue May 16, 2022 · 2 comments · Fixed by #495 or #496
Assignees

Comments

@awmleer
Copy link
Contributor

awmleer commented May 16, 2022

Describe the bug

Open the codesandbox below. The web page should be able to scroll normally. Then click on one of the cards. It'll open a new page. Switch back to the sandbox page and you'll find the whole page can't be scrolled.

Seems like the scroll lock doesn't get released… Also I found this bug only occurs when preventScroll is set to true and in @use-gesture/react v10.2.13.

I think this bug was introduced by 6896094, which solves #485.

Sandbox or Video

For preview: https://1b8n4s.csb.app/
With editor: https://codesandbox.io/s/late-sound-1b8n4s?file=/src/App.js

RPReplay_Final1652701134.MP4

Information:

  • Use Gesture version: 10.2.13
  • Device: iPhone 12 mini
  • OS: iOS 15.4.1
  • Browser iOS Safari

Checklist:

  • I've read the documentation.
  • If this is an issue with drag, I've tried setting touch-action: none to the draggable element.
@awmleer awmleer changed the title Open a new page will stop the Open a new page will lock the scroll of the old page May 16, 2022
@dbismut
Copy link
Collaborator

dbismut commented May 16, 2022

Indeed. This is must be due to this commit: 6896094#diff-bdb226cd6a706170fbb3438b6eefc36f52e23458ac4190aace4c5d11c89d3a11, I knew this would fire back somehow.

@awmleer
Copy link
Contributor Author

awmleer commented May 17, 2022

v10.2.14 works now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants