From df3589f207b54282b8345996aa1a90e8ab5d50b8 Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Wed, 28 Jun 2023 13:37:19 -0500
Subject: Fix: hide the keyboard before showing the discard modal (#925)

---
 src/view/com/composer/Composer.tsx | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'src/view/com/composer/Composer.tsx')

diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx
index 700c863a9..caece3476 100644
--- a/src/view/com/composer/Composer.tsx
+++ b/src/view/com/composer/Composer.tsx
@@ -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',
-- 
cgit 1.4.1

