Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: only close drawer if directly tapping backdrop (#3534)

authored by

Mary and committed by
GitHub
23056daa cb3f2468

+13 -7
+13 -7
src/view/shell/index.web.tsx
··· 1 1 import React, {useEffect} from 'react' 2 - import {StyleSheet, TouchableOpacity, View} from 'react-native' 2 + import {StyleSheet, TouchableWithoutFeedback, View} from 'react-native' 3 3 import {msg} from '@lingui/macro' 4 4 import {useLingui} from '@lingui/react' 5 5 import {useNavigation} from '@react-navigation/native' ··· 51 51 <PortalOutlet /> 52 52 53 53 {!isDesktop && isDrawerOpen && ( 54 - <TouchableOpacity 55 - onPress={() => setDrawerOpen(false)} 56 - style={styles.drawerMask} 54 + <TouchableWithoutFeedback 55 + onPress={ev => { 56 + // Only close if press happens outside of the drawer 57 + if (ev.target === ev.currentTarget) { 58 + setDrawerOpen(false) 59 + } 60 + }} 57 61 accessibilityLabel={_(msg`Close navigation footer`)} 58 62 accessibilityHint={_(msg`Closes bottom navigation bar`)}> 59 - <View style={styles.drawerContainer}> 60 - <DrawerContent /> 63 + <View style={styles.drawerMask}> 64 + <View style={styles.drawerContainer}> 65 + <DrawerContent /> 66 + </View> 61 67 </View> 62 - </TouchableOpacity> 68 + </TouchableWithoutFeedback> 63 69 )} 64 70 </> 65 71 )