Fix: hide the keyboard before showing the discard modal (#925)
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user