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

When trigger touchmove on virtual-list, the parent scroll container will scroll due to event.preventDefault is not working in mobile safari #5191

Closed
1 task
LiZhequ opened this issue Jan 21, 2022 · 1 comment
Labels

Comments

@LiZhequ
Copy link

LiZhequ commented Jan 21, 2022

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.0.0-beta.7

Environment

ios13.4.1 vue3.2.23

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Place the select component with enough select option (can in virtual scroll) in a scroll container, then touch the option and move.

What is expected?

the scroll container will not scroll unless the option list scroll to top or bottom

What is actually happening?

the scroll container will scroll.


when touchmove, the event.canceble value is false which is true in other browser like android chrome.
following code can fix the problem

document.addEventListener('touchmove', ()=>{}, { passive: false })

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant