react-native-modalize icon indicating copy to clipboard operation
react-native-modalize copied to clipboard

Automatic keyboard hidding

Open hrdyjan1 opened this issue 2 years ago • 3 comments

Describe the bug The keyboard bounces strangely when using the library by default. For me, it's definitely a bug that should be treated. Every time I click on the text input in modal, it jumps a bit, and then when I try to scroll It jumps back. I spent the whole day trying different settings and I couldn't fix it.

I simulated that problem on the very basic bare react-native project

Reproduce modalize-text-input

Dependencies:

  • "react": "17.0.2",
  • "react-native": "0.68.1",
  • "react-native-gesture-handler": "^2.4.1",
  • "react-native-modalize": "^2.0.13",
  • "react-native-portalize": "^1.0.7",
  • "react-native-reanimated": "^2.7.0"
  • ❌ expo/react-navigation/react-native-navigation // No expo/navigation

Source code:

const App = () => {
  const modalizeRef = React.useRef<Modalize>(null);

  const Conent = gestureHandlerRootHOC(() => (
    <View >
      <Text>{faker.lorem.paragraphs(8)}</Text>
      <TextInput
        placeholder="Type your username"
        clearButtonMode="while-editing"
      />
    </View>
  ));

  return (
    <Host>
      <GestureHandlerRootView>
        <Portal>
          <Modalize ref={modalizeRef}>
            <Conent />
          </Modalize>
        </Portal>
        <Button onPress={() => modalizeRef.current?.open()} title="open" />
      </GestureHandlerRootView>
    </Host>
  );
};

hrdyjan1 avatar Apr 21 '22 12:04 hrdyjan1

Sorry, friend, your issue does not properly use one of this repo's available issue templates. (log)

github-actions[bot] avatar May 24 '22 23:05 github-actions[bot]

You used keyboardavoidingview?

Marcuspo avatar Jun 01 '22 13:06 Marcuspo

You used keyboardavoidingview?

Nope. I'd try it tomorrow.

hrdyjan1 avatar Jun 02 '22 17:06 hrdyjan1