react-signature-canvas icon indicating copy to clipboard operation
react-signature-canvas copied to clipboard

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

Open DrMeers opened this issue 2 years ago • 4 comments

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?

DrMeers avatar Mar 01 '22 01:03 DrMeers

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.

agilgur5 avatar Mar 01 '22 02:03 agilgur5

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

DrMeers avatar Mar 01 '22 02:03 DrMeers

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

djberg96 avatar Apr 12 '24 18:04 djberg96

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.

agilgur5 avatar Apr 12 '24 18:04 agilgur5