Weird scrolling issues in iOS web views #747
blutorange
started this conversation in
General
Replies: 1 comment 3 replies
-
What version of signature_pad are you using and are you using it directly or through another package (e.g. react-signature-canvas)? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We had an issue similar to #626, where the page would scroll and the user could not draw a signature. I'm making this a discussion instead of an issue since I don't have any way to debug it any further. Perhaps this helps somebody with similar issues.
Now the curious part about this is that it worked on almost every browser and device (including an iPhone with Safari). The only environment where the scrolling issue occurred was when the web page with the signature was viewed inside a UIWebView of an iOS app. UIWebView is currently deprecated in favor of WKWebView, I do not develop the app and cannot test if updating to WKWebView would solve the issue.
I also do not have access to an iPhone, but a colleague working remotely does. We were at least able to come up with a workaround. The
canvas
with signature pad is inside adiv
, and once we added an event listener for thetouchmove
event to the containerdiv
that prevents the default (and also stopped its propagation for good measure), the scrolling issue disappeared and signatures could be drawn again (incidentally, settingstouch-events: none
on the containerdiv
did not help, as was also mentioned in #626)I find this strange, as it seems this library already registers a listener on the canvas and stops the default, but this might be specific to iOS web view, as the signature pad on same web page works perfectly when the web page is viewed directly in the Safari browser on the same device.
Beta Was this translation helpful? Give feedback.
All reactions