Fix: hide the keyboard before showing the discard modal (#925)
This commit is contained in:
parent
8d32f3de37
commit
df3589f207
1 changed files with 4 additions and 0 deletions
|
@ -2,6 +2,7 @@ import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'
|
||||||
import {observer} from 'mobx-react-lite'
|
import {observer} from 'mobx-react-lite'
|
||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
|
Keyboard,
|
||||||
KeyboardAvoidingView,
|
KeyboardAvoidingView,
|
||||||
Platform,
|
Platform,
|
||||||
ScrollView,
|
ScrollView,
|
||||||
|
@ -95,6 +96,9 @@ export const ComposePost = observer(function ComposePost({
|
||||||
if (store.shell.activeModals.some(modal => modal.name === 'confirm')) {
|
if (store.shell.activeModals.some(modal => modal.name === 'confirm')) {
|
||||||
store.shell.closeModal()
|
store.shell.closeModal()
|
||||||
}
|
}
|
||||||
|
if (Keyboard) {
|
||||||
|
Keyboard.dismiss()
|
||||||
|
}
|
||||||
store.shell.openModal({
|
store.shell.openModal({
|
||||||
name: 'confirm',
|
name: 'confirm',
|
||||||
title: 'Discard draft',
|
title: 'Discard draft',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue