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 canvas inside a container with overflow on touchscreen #4931

Closed
beaumartinez opened this issue Apr 27, 2018 · 2 comments · Fixed by #4933
Closed

Can't scroll canvas inside a container with overflow on touchscreen #4931

beaumartinez opened this issue Apr 27, 2018 · 2 comments · Fixed by #4933

Comments

@beaumartinez
Copy link

Version

2.2.3

Test Case

https://jsfiddle.net/beaumartinez/d5ko5Ly2/6/

Steps to reproduce

Create a canvas inside a container. The container must have overflow. The canvas must be larger than the container.

You can scroll the canvas on desktop; you can't on touchscreen, even with allowTouchScrolling.

Expected Behavior

You can scroll the container on touchscreen.

Actual Behavior

You can't scroll the container on touchscreen.

@beaumartinez
Copy link
Author

I did some investigation. Fabric.js applies touch-action: none to the canvas style. Removing that allows scrolling.

An easy fix would be checking allowTouchScrolling, and if that is true, we don't set that style.

@asturur
Copy link
Member

asturur commented Apr 27, 2018

yeah this is an idea

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

Successfully merging a pull request may close this issue.

2 participants