bencentra / jq-signature

jQuery plugin for creating touch-friendly signature fields using the HTML5 canvas
http://bencentra.github.io/jq-signature/
MIT License
47 stars 28 forks source link

Chrome Issue #10

Open julietmb opened 7 years ago

julietmb commented 7 years ago

It no longer appears to work in Chrome. Any chance of an update?

bencentra commented 7 years ago

I don't actively maintain this project, but I'll take a look if I get a chance. Pull requests are always welcome!

What specifically isn't working?

julietmb commented 7 years ago

If I view your demo in Chrome, the box appears but you cannot draw anything in it, nothing appears, the box just stays white. But compared with anything else out there, your implementation is so clean and simple I really wanted to use it.

jmarus commented 7 years ago

Bump for this! Was just about to release this to the wild but Chrome is pretty important :)

Your implementation is the best out there. I just need a really simple signature system, and I was hoping this would be it!

bencentra commented 7 years ago

Taking a quick look, it appears to be this line throwing a wrench in things: https://github.com/bencentra/jq-signature/blob/master/jq-signature.js#L85

I'm guessing Chrome (and possibly other browsers) have implemented PointerEvents as well, and so only the Microsoft-style event handlers are getting applied. Simply removing the "if" block seems to restore things to normal. It appears to be working cross-browser via Browserstack, but I don't know if that's a reliable simulation of touch events...

I can push out a 2.0.0 update that resorts to just touch events to fix Chrome. I can follow up shortly with fixes for other browsers as I'm able to test them.