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

dragRotate broken on mobile Chrome #53

Closed
jh3y opened this issue Jun 6, 2019 · 7 comments
Closed

dragRotate broken on mobile Chrome #53

jh3y opened this issue Jun 6, 2019 · 7 comments
Labels
bug Something isn't working

Comments

@jh3y
Copy link

jh3y commented Jun 6, 2019

So far with Zdog I've not had much luck with fluid dragRotate on anything other than desktop browser. If I try to drag on say Chrome on Android/iOS I can only drag a small amount before the drag stops. I've attached a GIF of the issue being replicated in the Chrome inspector.

zdog drag issue

Test case: https://codepen.io/desandro/pen/YbrLaO / zzz.dog

I've taken a look through the code and think I have an idea of where to debug the issue. I'll see if I can put some time into it 👍

@turbo
Copy link

turbo commented Jun 6, 2019

Same, the drag implementation does not work for me on mobile (iOS Safari and Android Chrome)

@desandro
Copy link
Member

desandro commented Jun 6, 2019

Thanks for reporting this issue. I'm not able to replicate it in iOS Safari or iOS Chrome. I'll have to take a look in desktop emulation.

@desandro desandro added the bug Something isn't working label Jun 6, 2019
@partynikko
Copy link

I have the same problem running Chrome on Android

turbo added a commit to turbo/lezzie that referenced this issue Jun 6, 2019
feat: resolve (metafizzy#53) by removing PointerEvent usage
@desandro
Copy link
Member

desandro commented Jun 7, 2019

Looks like this a touch device issue — similar to this SO thread. We can resolve it with touch-action: none CSS. I'll add a fix for the next release. In the meantime, you can add this CSS:

.zdog-canvas {
  touch-action: none;
}

@desandro desandro changed the title dragRotate on device dragRotate broken on mobile Chrome Jun 7, 2019
@jh3y
Copy link
Author

jh3y commented Jun 7, 2019

Should/Could I open a PR where that CSS is applied to the element?

desandro added a commit that referenced this issue Jun 7, 2019
@desandro
Copy link
Member

desandro commented Jun 7, 2019

@jh3y Thanks for the offer, but I got this one covered.

@desandro desandro closed this as completed Jun 7, 2019
@jh3y
Copy link
Author

jh3y commented Jun 7, 2019

Oh. That's a shame. I'd have been happy to open a small PR applying that CSS to element after sourcing the issue.
You wouldn't want to apply touch-action: none though if PointerEvent isn't available on window right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

4 participants