YanYuanFE / react-native-signature-canvas

:black_nib: React Native Signature Component based WebView Canvas for Android && IOS && expo
MIT License
417 stars 149 forks source link

[Android] [Bug]: Leaving a dot breaks behavior when the keyboard is open #346

Open BohdanBida opened 8 months ago

BohdanBida commented 8 months ago

When opening the keyboard, if a dot was left on the canvas, the canvas begins to behave strangely, the keyboard pushes it up (if it reaches it)

I checked how it works with different softInputMods for adjustPan - the canvas is pushed upward for adjustResize - the canvas is pushed upward by half its height for adjustNothing - the canvas does not move, however this does not work as a solution and breaks other logic of my screen

If I just moving along the canvas leaving bends, everything works fine until at least one dot is drawn

It looks like this is a bug, is there a way to avoid it manually and will it ever be fixed?

YanYuanFE commented 7 months ago

Can you provide a minimal code reproduction?

BohdanBida commented 5 months ago

@YanYuanFE I can provide an example, but perhaps with a related problem, unfortunately I can't change softInputMode in sandbox https://snack.expo.dev/@bohdanbida/react-native-signature-canvas--bug-example?platform=android

In this example, you can notice that when we put a point while the keyboard is open, the type of keyboard changes and hided, this does not happen if we just draw curves on the canvas

This tells me that the canvas behaves like an input when drawing a point. This could be a potential cause: the softInputMode that I need pushes the input up (which unfortunately happens with canvas)