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
Signature not working Google Chrome, mobile devices (width >= 1080) #426
Comments
I got no idea why it might be happening. Could you add a listener for BTW. Could you set up a demo somewhere? I've got Android tablet, which probably has resolution higher than 1080. |
Sorry for the delay. Yes, I can. Let me see if I can set up a demo for you. |
@szimek , Codepen:
I added a listener for |
Hi, Have you been able to check it? @szimek :C |
Hi, I had this same issue, I think I've fixed it by implementing the following within an on window load & window resize function (I am also using jQuery):
I am not sure if it was unbinding and rebinding or if it was setting a canvas width as well as context width that seems to have fixed it. Hope this helps you. |
According to @Steeveuk things, Just use the SignaturePadInstance.off() and re enable by SignaturePadInstance.on() |
Hi,
First thank you for your work.
Secondly, I have a problem with some mobile devices (smart phones and tablets) of width greater than or equal to 1080 pixels (like HTC M9 Plus, Moto g (6) and Moto g5 Plus, Samsung SM-T385M). In these devices the signature doesn't work, when I try to sign, the page do a scroll (up or down) and only draw a point into the canvas (look the image). The issue only happen in Google Chrome, in Firefox works fine (with one or more signatures). In other case with more than one signature, only the first signature works and the others doesn't work -Google Chrome-.
Watching the browser console I found this error:
[Intervention] Ignored attempt to cancel a touch event with cancelable = false, for example because scrolling is in progress and cannot be interrupted signature-pad.js:63
In this line:
this._handleTouchEnd = function (event) { var wasCanvasTouched = event.target === self._canvas; if (wasCanvasTouched) { event.preventDefault(); self._strokeEnd(event); } };
I changed it to:
this._handleTouchEnd = function (event) { var wasCanvasTouched = event.target === self._canvas; if (wasCanvasTouched && event.cancelable) { event.preventDefault(); self._strokeEnd(event); } };
The error in the console stopped to appearing, but the signature not working yet. I tried with version 2.3.0 and does not work either.
Maybe do you have any idea about it?. Thanks.
The text was updated successfully, but these errors were encountered: