-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Library cannot be used in iOS v13 and older #580
Comments
oh yeah i probably should say: user cannot stroke any lines in the canvas after that error. I guess it is pretty much breaking the pad. I think it is important to make it runs on iOS 13 because many devices still works on them. |
i hope this PR #581 suffices to solve this issue. Just awaiting for approval |
I noticed on Android 6.0.1 that also upgrading it stopped working, reverting back to The error was about an illegal constructor typescript, I wonder if this is the same issue that you're running into. |
@welsh well luckily on Android OS, the browser engine actually decoupled with the OS itself. So you just need to upgrade the browser to the latest and it would have the newest browser engine, and thus it would work with the latest library. Unfortunately, it is different with iOS, though. No matter the browser in iOS, it always uses webkit engine . The engine (webkit) is coupled with the iOS. That is why to upgrade browser engine, you would need to upgrade iOS as well.. It doesn't sit really well because it would make this library unusable in many devices that currently being used. |
For the current problem, my solution is to introduce an EventTarget polyfill in the head tag of html. |
fixed by #581 |
It happened ever since using event emitter that merged by this PR #567
i setup a simple html script that opened from iPhone (iOS 13.6) emulator. The script pretty much the same with the fiddler on the README.md (https://jsfiddle.net/szimek/jq9cyzuc/), but i wrapped the SignaturePad object creation with try-catch to see the error.
Original Code:
Modified to:
Here is the error:
I think it is because the SignaturePad inherits from EventTarget and call EventTarget constructor. Hence the "super()" error.
iOS only start support EventTarget constructor from iOS 14....
https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/eventTarget
The text was updated successfully, but these errors were encountered: