-
Notifications
You must be signed in to change notification settings - Fork 150
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
Once smooth-dnd is touched, can not scroll any more page #83
Comments
My workaround: const cleanClasses = () => { document.addEventListener('touchend', cleanClasses, false); |
@a-tonchev You just saved me with this workaround! Thank you! |
The problem seems to be here. Line 51 in a496ad7
Removing only that class should be less invasive 👌🏻 |
Alternate fix: // Call from your drop handler.
export function cleanSmoothDnd() {
document.body.className = document.body.className
.split(' ')
.filter(c => c.indexOf('dnd') < 0)
.join(' ')
} |
The problem is that normal scrolling is not possible. One can only drag and drop elements only. If you try to scroll to the top or bottom it is not possible. |
@Akash187 You're right! Simulator seems to be misleading in this case. Back to the drawing board. |
Just adding an observation: @a-tonchev's workaround didn't seem to improve the behavior when running chrome on desktop pretending to be a mobile device, but it does fix the issue when I run the code on my actual iPhone. |
I write about this bug in the react-smooth-dnd, but after I check it looks like the bug is from smooth-dnd.
The bug apears on touch devices when you touch or scroll on the smooth-dnd container once, then no more page scrolling is possible.
Bug is reproduced in browser and also in mobile:
Open demo page: https://kutlugsahin.github.io/smooth-dnd-demo/ with mobile chrome / or desktop chrome in Device-mode to simulate touch event
Scroll or somehow touch the smooth-dnd container
-> no more native scrolling possible. You can not scroll top or bottom of the page any more. Page is like blocked.
Expected behavior: scrolling should be possible at any time, maybe only not when dragging item.
If you want guys, I can also upload a video?
Thanks and best regards
The text was updated successfully, but these errors were encountered: