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 page after interacting with canvas on touch screen. #3752

Closed
samuelkilada opened this issue Feb 28, 2017 · 7 comments
Closed

Can't scroll page after interacting with canvas on touch screen. #3752

samuelkilada opened this issue Feb 28, 2017 · 7 comments

Comments

@samuelkilada
Copy link

Version

1.7.6

Test Case

Kind of hard to duplicate as it happens in Cordova.

Steps to reproduce

I have a cordova app, and updated to Fabric version 1.7.6 in order to fix the bug caused by #3690. Though that did the trick, now as soon as you touch the canvas on a touch screen device, the rest of the page cannot scroll anymore, even when the canvas is hidden. You have to leave the page entirely to reset it.

Expected Behavior

You should be able to scroll a page regardless of whether you have edited / touched a canvas.

Actual Behavior

Cannot scroll after editing / touching a canvas.

@asturur
Copy link
Member

asturur commented Feb 28, 2017

if it happens in cordova and can't be replicate in an html page alone i cannot take care of it.

@samuelkilada
Copy link
Author

That makes sense. Any ideas that might point me in the right direction? The only thing I changed in my app was the fabric version, and so that is causing the problem somehow. If you are aware of anything I would greatly appreciate it. Either way, thank you for the time!

@asturur
Copy link
Member

asturur commented Feb 28, 2017

can you open the app in a normal browser? if yes inspect the canvas element, search for the style.l property touch-action and remove it

other than that check the file in the repo canvas.events.mixin.js

if the touch events are appended to window, that may cause problems?

@samuelkilada
Copy link
Author

Interesting thoughts, thank you. I don't exactly know what's going on, but somehow upon editing the Fabric canvas the touch events are stripped from the rest of the document. This is occurring on both Android and Windows Phone. The only element that does continue to allow scrolling is the very background of the page, so you have to carefully place your finger right on the background (most of it is covered in my app) in order to be able to scroll.

Perhaps your hunch that the events are being appended to the window is correct, because only the window itself is receiving the events. Just trying to figure out what to do about it.

@guari
Copy link

guari commented Mar 2, 2017

See bug #3756, it seems to happen on many IOS Safari versions, with a simple free-drawing setting, tested on latest release.

@khmyznikov
Copy link

@samuelkilada try to use canvas.discardActiveObject() then you hide/leave canvas

@asturur
Copy link
Member

asturur commented Apr 23, 2017

to be handled in #3869

@asturur asturur closed this as completed Apr 23, 2017
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

4 participants