make sure click events on the emoji picker don't bubble up to the mask (#1427)
parent
bcd63e710c
commit
27cb1bd276
|
@ -58,6 +58,11 @@ export function EmojiPicker({close}: {close: () => void}) {
|
||||||
// eslint-disable-next-line react-native-a11y/has-valid-accessibility-descriptors
|
// eslint-disable-next-line react-native-a11y/has-valid-accessibility-descriptors
|
||||||
<TouchableWithoutFeedback onPress={close} accessibilityViewIsModal>
|
<TouchableWithoutFeedback onPress={close} accessibilityViewIsModal>
|
||||||
<View style={styles.mask}>
|
<View style={styles.mask}>
|
||||||
|
{/* eslint-disable-next-line react-native-a11y/has-valid-accessibility-descriptors */}
|
||||||
|
<TouchableWithoutFeedback
|
||||||
|
onPress={e => {
|
||||||
|
e.stopPropagation() // prevent event from bubbling up to the mask
|
||||||
|
}}>
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
styles.picker,
|
styles.picker,
|
||||||
|
@ -73,6 +78,7 @@ export function EmojiPicker({close}: {close: () => void}) {
|
||||||
autoFocus={false}
|
autoFocus={false}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
</TouchableWithoutFeedback>
|
||||||
</View>
|
</View>
|
||||||
</TouchableWithoutFeedback>
|
</TouchableWithoutFeedback>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue