Fix: hide the keyboard before showing the discard modal (#925)
parent
8d32f3de37
commit
df3589f207
|
@ -2,6 +2,7 @@ import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'
|
|||
import {observer} from 'mobx-react-lite'
|
||||
import {
|
||||
ActivityIndicator,
|
||||
Keyboard,
|
||||
KeyboardAvoidingView,
|
||||
Platform,
|
||||
ScrollView,
|
||||
|
@ -95,6 +96,9 @@ export const ComposePost = observer(function ComposePost({
|
|||
if (store.shell.activeModals.some(modal => modal.name === 'confirm')) {
|
||||
store.shell.closeModal()
|
||||
}
|
||||
if (Keyboard) {
|
||||
Keyboard.dismiss()
|
||||
}
|
||||
store.shell.openModal({
|
||||
name: 'confirm',
|
||||
title: 'Discard draft',
|
||||
|
|
Loading…
Reference in New Issue