Signature Pad works everywhere except on Safari

562 Views Asked by At

Good morning, everyone.

I'm trying to get my client's signature through a canvas. The script I'm using is:

https://cdn.jsdelivr.net/npm/[email protected]/dist/signature_pad.umd.min.js

It works completely fine on Chrome Browser and Android phones, so it does work on mobile. The problem however arises on Iphones, using Safari. It simply won't get any input and shows me an error message when inspected: signature_pad.umd.min.js:5SyntaxError: Use of reserved word 'class'

Use of reserved word 'class' error

I'm afraid of messing around with the js, since it works just fine in other browsers. Could someone help me with this?

Thank you in advance!

1

There are 1 best solutions below

1
박현식 On

In my case, it was a version problem. It worked on the Safari by using a lower vision of signature_pad.

"https://cdn.jsdelivr.net/npm/[email protected]/dist/signature_pad.min.js".