Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix keyboard close on adding a tag

ammarahm-edfb9457086e0b
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}) => {
}}>
<ScrollView
horizontal
+ keyboardShouldPersistTaps="always"
+ keyboardDismissMode="none"
contentContainerStyle={{
flexDirection: 'row',
alignItems: 'center',
@@ -203,7 +205,11 @@ export const ActionSheetTagsSection = ({item, close}) => {
/>
))}
</ScrollView>
- <View
+ <TouchableOpacity
+ activeOpacity={1}
+ onPress={() => {
+ 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}
/>
- </View>
+ </TouchableOpacity>
</View>
) : 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);