mohebifar / react-native-copilot

Step-by-step walkthrough tooltip for your react native app
MIT License
2.25k stars 409 forks source link

The back gesture/button on Android devices closes the walkthrough. #331

Open web-copilot opened 2 weeks ago

web-copilot commented 2 weeks ago

Current Behavior

When using react-native-copilot to integrate a walkthrough on a specific screen in my application, I encountered an issue: if the user presses the back button on Android while the walkthrough is active, the walkthrough closes unexpectedly, and no events from copilotEvents are registered to handle this action.

This is encountered only in android and no such issues are there in iOS.

Expected behavior/code I want to disable this behaviour, where on back gesture or on back button click in android, the walkthrough quits.

Environment

https://github.com/user-attachments/assets/48491e82-735d-4120-a3d6-89f671019081

ankurmalik491 commented 2 weeks ago

Yes this appears to me as well please provide any solution

even tried with onRequestclose and onDismiss method of react native model used internally by your package, but seems to not working

please provide a solution. thanks

Pawansk214 commented 2 weeks ago

Similar case for me. The walkthrough modal is getting closed on back press in Android.

Is there any callback or listener which gets the back press event which can be used to change this behavior?