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

Drag and drop causes page to scroll on iOS 11.3 #631

Closed
JWA111 opened this issue May 1, 2018 · 6 comments
Closed

Drag and drop causes page to scroll on iOS 11.3 #631

JWA111 opened this issue May 1, 2018 · 6 comments

Comments

@JWA111
Copy link

JWA111 commented May 1, 2018

Opening this issue related to #561

The page scrolls when the user drags an element on iOS 11.3. Please refer to the demos on interactjs.io for a reproduction.

Expected behavior

When touch-dragging the page does not scroll

Actual behavior

When touch-dragging the page scrolls

System configuration

interact.js version: 1.3.3
Browser name and version: Safari iOS 11.3, Chrome 66.0.3359.122 on iOS 11.3
Operating System: iOS 11.3

Tested this issue on a physical iPad (latest gen)

@mcdemarco
Copy link

This webkit issue includes links to some other drag-and-drop libraries' issues, which may be helpful.

@JWA111
Copy link
Author

JWA111 commented May 3, 2018

For anyone who may be having this issue, here are three ways other libraries have worked around it:

Shopify/draggable#200
atlassian/react-beautiful-dnd#416
lazd/iNoBounce#47

@taye
Copy link
Owner

taye commented May 8, 2018

Can you try using v1.4.0-alpha.5 (npm install interactjs@next) and calling the code below before you create any interactables?

interact.addDocument(window.document, {
  events: { passive: false },
});

@taye
Copy link
Owner

taye commented May 15, 2018

v1.3.4 has been published with a fix for the new iOS 11.3 issue. Thanks for the help.

@hilmanski
Copy link

Anyone faced this issue currently and know how to solve this? I dont's see passive attribute in docs for events

@devutoo
Copy link

devutoo commented Jan 23, 2023

Anyone faced this issue currently and know how to solve this? I dont's see passive attribute in docs for events

I am facing it. Have you found a solution/hack/workaround?

EDIT: In my case, I set touch-action:none on a ul element, but not on the li elements. After adding touch-action:none to all li elements, it worked in iOS Safari 15.something.

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

5 participants