From fb9457086e0b1d90666c652e3c5bee9f727754df Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Thu, 31 Dec 2020 12:16:28 +0500 Subject: [PATCH] fix keyboard close on adding a tag --- .../ActionSheetComponent/ActionSheetTagsSection.js | 11 +++++++++-- .../src/components/ActionSheetComponent/index.js | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/mobile/src/components/ActionSheetComponent/ActionSheetTagsSection.js b/apps/mobile/src/components/ActionSheetComponent/ActionSheetTagsSection.js index 2a2ba7e52..7aacfbc9a 100644 --- a/apps/mobile/src/components/ActionSheetComponent/ActionSheetTagsSection.js +++ b/apps/mobile/src/components/ActionSheetComponent/ActionSheetTagsSection.js @@ -160,6 +160,8 @@ export const ActionSheetTagsSection = ({item, close}) => { }}> { /> ))} - { + tagsInputRef.current?.focus(); + }} style={{ flexDirection: 'row', flexWrap: 'wrap', @@ -243,6 +249,7 @@ export const ActionSheetTagsSection = ({item, close}) => { fontSize: SIZE.md, textAlignVertical: 'center', }} + t testID={notesnook.ids.dialogs.actionsheet.hashtagInput} autoCapitalize="none" textAlignVertical="center" @@ -265,7 +272,7 @@ export const ActionSheetTagsSection = ({item, close}) => { onSubmitEditing={_onSubmit} onKeyPress={_onKeyPress} /> - + ) : null; }; diff --git a/apps/mobile/src/components/ActionSheetComponent/index.js b/apps/mobile/src/components/ActionSheetComponent/index.js index e4d30b498..f36ed2be3 100644 --- a/apps/mobile/src/components/ActionSheetComponent/index.js +++ b/apps/mobile/src/components/ActionSheetComponent/index.js @@ -496,6 +496,8 @@ export const ActionSheetComponent = ({ onScrollEndDrag={onScrollEnd} onScrollAnimationEnd={onScrollEnd} onMomentumScrollEnd={onScrollEnd} + keyboardShouldPersistTaps="always" + keyboardDismissMode="none" onLayout={() => { if (!item.dateDeleted) { localRefresh(item.type, true);