-
Notifications
You must be signed in to change notification settings - Fork 186
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
Mobile browser - Clears the signature on scrolling #16
Comments
@blackjk3 I think I got the solution, As I mentioned above, we need to use Now the question is, how to check if its mobile OR non-mobile (Desktop/laptop/iPad) - By checking |
Hey @ParthBarot-BoTreeConsulting - I'm having the same issue here. Were you able to resolve this with the resize? If so, I'd love to know a little more. I have an important launch tomorrow where I'm trying to resolve this. |
@hollyewhite Basically we wanted to avoid the resize event, and that needs to change the code. Instead, I looked at all the forks and found that the latest fork has something ready to use. We have used it and it has allowed us to disable the resize event https://github.com/agilgur5/react-signature-canvas I hope this helps. Thanks |
Thank you!
…On Mon, Nov 27, 2017 at 11:23 AM, Parth Barot ***@***.***> wrote:
@hollyewhite <https://github.com/hollyewhite> Basically we wanted to
avoid the resize event, and that needs to change the code. Instead, I
looked at all the forks and found that the latest fork has something ready
to use. We have used it and it has allowed us to disable the resize event
https://github.com/agilgur5/react-signature-canvas
I hope this helps.
Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AToRJOa00VoEYrwoYjS4n2cbd_7mn0_7ks5s6pvEgaJpZM4QgY5O>
.
|
@ParthBarot-BoTreeConsulting thanks for helping with this. |
In my case I solved it like this: And finally I detected browser type and handled the events accordingly. if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) |
In mobile, when we scroll up/down rapidly the addressbar appears and I think that fires the resize event, so the signature is cleared. Actually it should not happen, as per szimek/signature_pad#318 signature should be cleared on
orientationchange
event in mobile.We are trying to change
window.addEventListener("resize", this._resizeCanvas.bind(this));
towindow.addEventListener("orientationchange", this._resizeCanvas.bind(this));
in hereCan you please suggest a fix?
The text was updated successfully, but these errors were encountered: