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

Can't scroll on mobile device if touched on grid item. #155

Open
sumbganesh opened this issue Jan 9, 2024 · 1 comment
Open

Can't scroll on mobile device if touched on grid item. #155

sumbganesh opened this issue Jan 9, 2024 · 1 comment

Comments

@sumbganesh
Copy link

I have grid layout in my page. But in mobile devices, when i try to scroll by touching on any item in the grid, it won't scroll, but it will scroll when I touch on in gap or outside the items. How can I fix it?

@oleksii-dukhovenko
Copy link

oleksii-dukhovenko commented Jan 16, 2024

const touchScrollAllow = async () => {
    await tick()
    for(let elm of document.querySelectorAll('.svlt-grid-item'))
        elm.style.touchAction = 'auto'
}

afterUpdate(()=>{
    touchScrollAllow()
})

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

No branches or pull requests

2 participants