From 1f26b82d20639933edac949e10f0b098a39da7d3 Mon Sep 17 00:00:00 2001 From: Reinaldo Neto Date: Wed, 1 Mar 2023 18:10:05 -0300 Subject: [PATCH] change the scrollPersistTap --- app/containers/KeyboardView.tsx | 10 +--------- app/lib/methods/helpers/scrollPersistTaps.ts | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/app/containers/KeyboardView.tsx b/app/containers/KeyboardView.tsx index fec3c2ddf..99df6f923 100644 --- a/app/containers/KeyboardView.tsx +++ b/app/containers/KeyboardView.tsx @@ -1,9 +1,7 @@ import React from 'react'; import { KeyboardAwareScrollView, KeyboardAwareScrollViewProps } from '@codler/react-native-keyboard-aware-scroll-view'; -import { Keyboard, Pressable } from 'react-native'; import scrollPersistTaps from '../lib/methods/helpers/scrollPersistTaps'; -import sharedStyles from '../views/Styles'; interface IKeyboardViewProps extends KeyboardAwareScrollViewProps { keyboardVerticalOffset?: number; @@ -20,13 +18,7 @@ const KeyboardView = ({ style, contentContainerStyle, scrollEnabled, keyboardVer alwaysBounceVertical={false} extraHeight={keyboardVerticalOffset} > - {/** Use Pressable instead of TouchableWithoutFeedback, because the TouchableWithoutFeedback requires a view wrapping the children - * and this wrapping is causing wrong behavior on ScrollView - * https://stackoverflow.com/a/74456534 - * */} - Keyboard.dismiss()}> - {children} - + {children} ); diff --git a/app/lib/methods/helpers/scrollPersistTaps.ts b/app/lib/methods/helpers/scrollPersistTaps.ts index c625ac2a9..5e353cdd9 100644 --- a/app/lib/methods/helpers/scrollPersistTaps.ts +++ b/app/lib/methods/helpers/scrollPersistTaps.ts @@ -1,7 +1,7 @@ import { KeyboardAwareScrollViewProps } from '@codler/react-native-keyboard-aware-scroll-view'; const scrollPersistTaps: Partial = { - keyboardShouldPersistTaps: 'always', + keyboardShouldPersistTaps: 'handled', keyboardDismissMode: 'interactive' };