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

fix(useScrollLock): fix iOS touchmove bug #2362

Merged
merged 12 commits into from Jan 3, 2023
Merged

Conversation

robinscholz
Copy link
Contributor

Description

This PR solves iOS touchmove issues that prevent any children elements of the locked element from scrolling. I believe this will solve #2278.

Additional context

I believe there are no breaking changes, however it'd be good to confirm this with a few different devices.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@antfu antfu requested a review from webfansplz October 25, 2022 09:19
@robinscholz
Copy link
Contributor Author

Not sure why the test is failing, should have nothing to do with the proposed changes

webfansplz
webfansplz previously approved these changes Oct 26, 2022
@robinscholz
Copy link
Contributor Author

@webfansplz After some more tests I ran into problems with my original solution. I believe the only way to truly solve this is by checking for overflow: scroll within the event.target and its’ parentNodes.

Caveat is that the user needs to explicitly set the overflow to scroll to keep elements scrollable on iOS.

@robinscholz
Copy link
Contributor Author

@antfu would be happy to get your opinion on this implementation!

dpschen
dpschen previously approved these changes Dec 30, 2022
@antfu antfu merged commit c9a9a92 into vueuse:main Jan 3, 2023
@David-Tsui
Copy link

David-Tsui commented Jan 15, 2023

@robinscholz This problem still exists at 9.10.0, test by IOS devices in chrome emulator. I guess you forget to check the element with style overflow: auto.

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 this pull request may close these issues.

None yet

6 participants