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 {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',
|
||||||
|
|||||||
Reference in New Issue
Block a user