Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android]: OnPress not working when modal is open after updating react native version #737

Open
elencho opened this issue Mar 29, 2023 · 14 comments
Labels

Comments

@elencho
Copy link

elencho commented Mar 29, 2023

OnPress not working while modal is open after updating react native version, not on presseble and neither on TouchableOpacity, tried swapping it with built in modal and it worked, I think there is issue with newer components and modal. Also focusing on textinput is not working when modal is open. scroll works perfectly.

Environment

react-native: 0.71.4
react: 18.2.0

Platforms

only on android, tested on galaxy s22

Versions

  • Android: 13
  • iOS:
  • react-native-modal:^13.0.1
  • react-native:0.71.4
  • react:18.2.0

Description

it is suck on open screen, I can open and close modal without problem but I cant press anything. Flatlist works fine.

Reproducible Demo

<Modal isVisible={visible} onBackdropPress={hide} onSwipeComplete={hide} swipeDirection="down" propagateSwipe={true} style={styles.modal} animationOutTiming={500} backdropTransitionInTiming={300} onModalHide={onModalHide} hideModalContentWhileAnimating useNativeDriver useNativeDriverForBackdrop onDismiss={onDismiss} // coverScreen={false} > <Pressable onPress={() => console.log('first')} onLongPress={() => console.log('long')} unstable_pressDelay={0} style={{ backgroundColor: 'red', height: 100, width: 100 }} > <Text>asd</Text> </Pressable> <AppToast /> </Modal>

@elencho elencho added the bug label Mar 29, 2023
@FelipeGCastro
Copy link

Same here!

@batuhansahan
Copy link

batuhansahan commented Apr 3, 2023

Same here and cant find solution either.

Was ok on 0.70.5 after updating 0.71.5 it happened for me

@elencho
Copy link
Author

elencho commented Apr 3, 2023

For temporary solution I made TextInput position: 'absolute' and set Modal useNativeDriver to false, but it doesn't have best performance for now. hope we will have decent solution soon.

@elencho
Copy link
Author

elencho commented Apr 4, 2023

I tried to investigate more, The problem is this part
if (this.state.isSwipeable) { panHandlers = { ...this.panResponder.panHandlers }; if (useNativeDriver) { panPosition = { transform: this.state.pan.getTranslateTransform(), }; } else { panPosition = this.state.pan.getLayout(); } }.

So, I think react native animatable doesn't work right with new architecture changes

@elencho
Copy link
Author

elencho commented Apr 6, 2023

@FelipeGCastro @batuhansahan did you find fix?

@FelipeGCastro
Copy link

@elencho nothing here, did you find any solution ?

@elencho
Copy link
Author

elencho commented Apr 26, 2023

I disabled fabric

@Lucasark
Copy link

Lucasark commented May 4, 2023

For who is using RN 0.71+

oblador/react-native-animatable#401

@rizshivalli
Copy link

+1

@sbaiahmed1
Copy link

disable newArch ?

@elencho
Copy link
Author

elencho commented Jun 12, 2023

disable newArch ?

disabling fabric resolved issue, but it is just temporary fix

@rizshivalli
Copy link

Wrapping the Modal in a View solved the problem for me in RN 0.71.8

@pietro-marrone-dka
Copy link

pietro-marrone-dka commented Oct 18, 2023

onPress does not work even wrapping the modal with a View. New architecture, RN 0.72.5

@atultiwaree
Copy link

atultiwaree commented Mar 6, 2024

onPress does not work even wrapping the modal with a View. New architecture, RN 0.72.5

Mine working in android but not in ios with the RNVersion 0.72.5, the props insdie Modal like modalWillMount is invoking though, only visibility issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants