Skip to content

issues in latest Google Chrome 117 #100

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

Closed
zhil opened this issue Oct 12, 2023 · 4 comments
Closed

issues in latest Google Chrome 117 #100

zhil opened this issue Oct 12, 2023 · 4 comments
Labels
kind: support Asking for support with something or a specific use case scope: upstream Issue in upstream dependency solution: native canvas behavior This is not a bug and is just how the native canvas element works. solution: out-of-scope This is out of scope for this project

Comments

@zhil
Copy link

zhil commented Oct 12, 2023

After recent Google Chrome update I noticed, that react-signature-canvas is not working correctly any more.

Line is showed as dotted line and auto-removed.

Here is online sandbox
https://codesandbox.io/s/react-signature-canvas-example-forked-v2qrkh?file=/src/App.js

Not working in Google Chrome 117.0.5938.132 on Ubuntu
bug

Works just fine in Firefox on the same PC
bug

@agilgur5 agilgur5 changed the title react-signature-canvas is not working in latest Google Chrome issues in latest Google Chrome 117 Oct 12, 2023
@agilgur5
Copy link
Owner

I'm not sure that there's anything we can really do about a Chrome regression, especially in this tiny wrapper

@agilgur5 agilgur5 added scope: upstream Issue in upstream dependency kind: support Asking for support with something or a specific use case solution: out-of-scope This is out of scope for this project labels Oct 12, 2023
@zhil
Copy link
Author

zhil commented Oct 17, 2023

Sorry, I didnt realize, that this library is a wrapper.

I reported issue here
szimek/signature_pad#734

@agilgur5 agilgur5 added the solution: native canvas behavior This is not a bug and is just how the native canvas element works. label Oct 17, 2023
@zhil
Copy link
Author

zhil commented Nov 26, 2023

@agilgur5 native library author proposed solution, but I cant use it

szimek/signature_pad#734

You can opt in with something like this:

signaturePad.addEventListener("afterUpdateStroke", () => {
  window.resize();
});

I cant find any way to add event listener. I tried to use code like

sigPadRef.current._sigPad.addEventListener("afterUpdateStroke", () => {
            console.log('ACA-512 patch');
            window.resize();
        });

<SignatureCanvas ref={sigPadRef} ..... />

but its not working.

Also I cant find any props like OnAfterUpdateStroke etc. :(

@agilgur5
Copy link
Owner

agilgur5 commented Nov 26, 2023

Also I cant find any props like OnAfterUpdateStroke etc. :(

Yes that's part of the signature_pad v4 API. react-signature-canvas is still on v2 as v4 had many breaking changes that no contributor has attempted to address yet. See also #68

You can use the onEnd prop/callback which is roughly equivalent to v4's afterUpdateStroke.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: support Asking for support with something or a specific use case scope: upstream Issue in upstream dependency solution: native canvas behavior This is not a bug and is just how the native canvas element works. solution: out-of-scope This is out of scope for this project
Projects
None yet
Development

No branches or pull requests

2 participants