agilgur5 / react-signature-canvas

A React wrapper component around signature_pad (in < 150 LoC). Unopinionated and heavily updated fork of react-signature-pad
https://agilgur5.github.io/react-signature-canvas/
Other
528 stars 115 forks source link

Update to `signature_pad` v4 for "passive" events? #73

Open DrMeers opened 2 years ago

DrMeers commented 2 years ago

package.json seems to lock us into using version 2.3.2 of signature_pad, rather than the latest 4.0.2. I noticed because I encountered this error:

[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

and upon searching, found it has already been fixed in https://github.com/szimek/signature_pad/issues/308 years ago . Are we able to take advantage of the upstream fixes?

agilgur5 commented 2 years ago

See detailed discussion in #68 with regards to updating.

https://github.com/szimek/signature_pad/issues/308 was released in v3.0.0-beta.1, and per the discussion above, v3 never came out of beta and v4 was just recently released instead.

As far as I'm aware, the log you've output here is just a performance warning, and not blocking. react-signature-canvas and signature_pad v2 etc have been used in production for many years without significant performance issues. Have labeled this as an optimization and not high priority as such.

DrMeers commented 2 years ago

Great, thanks for the info and prompt response @agilgur5 !

djberg96 commented 2 months ago

@agilgur5 It's been a couple years, what's the status on updating to v4? Just curious.

agilgur5 commented 2 months ago

Any updates would be in the thread already. The changes are breaking in multiple ways, including ways not really known by one of the maintainers per #68, and no one has contributed an update to v4 that addresses breaking changes. Anyone is more than welcome to contribute.