Fix: hide the keyboard before showing the discard modal (#925)

zio/stable
Paul Frazee 2023-06-28 13:37:19 -05:00 committed by GitHub
parent 8d32f3de37
commit df3589f207
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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',