diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-09-03 23:13:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-03 23:13:25 +0100 |
commit | 39f74ced5c81bb103a87cd39b0f1dae955dbb31d (patch) | |
tree | 75c35cae3f461ea9a92ede78d9104699fa2e918d /src | |
parent | 3ee5ef32d9d4342c3ce473933d84aa2ef01dd97b (diff) | |
download | voidsky-39f74ced5c81bb103a87cd39b0f1dae955dbb31d.tar.zst |
close keyboard before opening modal (#5124)
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/composer/videos/SubtitleDialog.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/view/com/composer/videos/SubtitleDialog.tsx b/src/view/com/composer/videos/SubtitleDialog.tsx index 90a29b25d..9cd8eae47 100644 --- a/src/view/com/composer/videos/SubtitleDialog.tsx +++ b/src/view/com/composer/videos/SubtitleDialog.tsx @@ -1,5 +1,5 @@ import React, {useCallback} from 'react' -import {StyleProp, View, ViewStyle} from 'react-native' +import {Keyboard, StyleProp, View, ViewStyle} from 'react-native' import RNPickerSelect from 'react-native-picker-select' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -45,7 +45,10 @@ export function SubtitleDialogBtn(props: Props) { size="xsmall" color="secondary" variant="ghost" - onPress={control.open}> + onPress={() => { + if (Keyboard.isVisible()) Keyboard.dismiss() + control.open() + }}> <ButtonIcon icon={CCIcon} /> <ButtonText> {isWeb ? <Trans>Captions & alt text</Trans> : <Trans>Alt text</Trans>} |