From 1748ba5dcd34b5fe07a55e85186e4e1fff90bcb7 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Sun, 5 May 2024 01:01:49 +0100 Subject: [PATCH] dismiss keyboard on open msg menu --- src/components/dms/ActionsWrapper.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/dms/ActionsWrapper.tsx b/src/components/dms/ActionsWrapper.tsx index 107e5eb8e9..19a3e0424b 100644 --- a/src/components/dms/ActionsWrapper.tsx +++ b/src/components/dms/ActionsWrapper.tsx @@ -1,5 +1,5 @@ import React, {useCallback} from 'react' -import {Pressable, View} from 'react-native' +import {Keyboard, Pressable, View} from 'react-native' import Animated, { cancelAnimation, runOnJS, @@ -38,6 +38,7 @@ export function ActionsWrapper({ // Reanimated's `runOnJS` doesn't like refs, so we can't use `runOnJS(menuControl.open)()`. Instead, we'll use this // function const open = useCallback(() => { + Keyboard.dismiss() menuControl.open() }, [menuControl])