close keyboard before opening modal (#5124)
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import React, {useCallback} from 'react'
|
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 RNPickerSelect from 'react-native-picker-select'
|
||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
@@ -45,7 +45,10 @@ export function SubtitleDialogBtn(props: Props) {
|
|||||||
size="xsmall"
|
size="xsmall"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
onPress={control.open}>
|
onPress={() => {
|
||||||
|
if (Keyboard.isVisible()) Keyboard.dismiss()
|
||||||
|
control.open()
|
||||||
|
}}>
|
||||||
<ButtonIcon icon={CCIcon} />
|
<ButtonIcon icon={CCIcon} />
|
||||||
<ButtonText>
|
<ButtonText>
|
||||||
{isWeb ? <Trans>Captions & alt text</Trans> : <Trans>Alt text</Trans>}
|
{isWeb ? <Trans>Captions & alt text</Trans> : <Trans>Alt text</Trans>}
|
||||||
|
|||||||
Reference in New Issue
Block a user