Skip to content

Commit 1809f21

Browse files
MelvinBotEskalifer1
andcommitted
Dismiss keyboard before navigating to invite message screen
Prevents Android InsetsController crash by ensuring the keyboard is dismissed before navigation, avoiding a race condition between the keyboard close animation and view hierarchy changes. Co-authored-by: Eskalifer1 <Eskalifer1@users.noreply.github.com>
1 parent 94d100a commit 1809f21

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/pages/workspace/DynamicWorkspaceInvitePage.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, {useCallback, useEffect, useMemo, useState} from 'react';
2+
import {Keyboard} from 'react-native';
23
import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton';
34
import HeaderWithBackButton from '@components/HeaderWithBackButton';
45
import ScreenWrapper from '@components/ScreenWrapper';
@@ -166,6 +167,7 @@ function DynamicWorkspaceInvitePage({route, policy}: WorkspaceInvitePageProps) {
166167
);
167168

168169
const inviteUser = useCallback(() => {
170+
Keyboard.dismiss();
169171
HttpUtils.cancelPendingRequests(READ_COMMANDS.SEARCH_FOR_USERS);
170172

171173
const invitedEmailsToAccountIDs: InvitedEmailsToAccountIDs = {};

0 commit comments

Comments
 (0)