[🐴] Dismiss keyboard before opening convo menu (#3862)
* Dismiss keyboard before opening convo menu * call `props.onPress()` insteadzio/stable
parent
4862bc2ba8
commit
9b7818d358
|
@ -1,5 +1,5 @@
|
|||
import React, {useCallback} from 'react'
|
||||
import {Pressable} from 'react-native'
|
||||
import {Keyboard, Pressable} from 'react-native'
|
||||
import {AppBskyActorDefs} from '@atproto/api'
|
||||
import {ChatBskyConvoDefs} from '@atproto-labs/api'
|
||||
import {msg, Trans} from '@lingui/macro'
|
||||
|
@ -88,6 +88,11 @@ let ConvoMenu = ({
|
|||
{({props, state}) => (
|
||||
<Pressable
|
||||
{...props}
|
||||
onPress={() => {
|
||||
Keyboard.dismiss()
|
||||
// eslint-disable-next-line react/prop-types -- eslint is confused by the name `props`
|
||||
props.onPress()
|
||||
}}
|
||||
style={[
|
||||
a.p_sm,
|
||||
a.rounded_sm,
|
||||
|
|
|
@ -213,7 +213,7 @@ export function MessagesList() {
|
|||
contentContainerStyle={a.flex_1}>
|
||||
{/* This view keeps the scroll bar and content within the CenterView on web, otherwise the entire window would scroll */}
|
||||
{/* @ts-expect-error web only */}
|
||||
<View style={[{flex: 1}, isWeb && {'overflow-y': 'scroll'}]}>
|
||||
<View style={[a.flex_1, isWeb && {'overflow-y': 'scroll'}]}>
|
||||
{/* Custom scroll provider so that we can use the `onScroll` event in our custom List implementation */}
|
||||
<ScrollProvider onScroll={onScroll} onMomentumEnd={onMomentumEnd}>
|
||||
<List
|
||||
|
|
Loading…
Reference in New Issue