-
Notifications
You must be signed in to change notification settings - Fork 264
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
When modal request permission appear then the modal toast on the previous screen also appears -> android #226
Comments
I have the same issue, any updates ? |
i
+1 |
Fixed in If you find any issues with the v2 implementation, feel free to reopen this issue. Thanks! |
@calintamas thank you for you support but I continue having the same issue in Android, already I update to the latest version 2.0.0 |
@chernandezq Can you add a code sample showing how are you rendering the Toast component? Maybe you could fill in the bug report template, so I can have a better chance at debugging this issue:
|
Hey @calintamas, we like your package and we appreciate your efforts. I'm having the same issue here: Describe the bug Steps to reproduce
Expected behavior Code sample Environment (please complete the following information):
|
Hi @Majid3ziz, try rendering the Toast alongside the navigation container, like this: https://github.com/calintamas/react-native-toast-message/blob/main/docs/navigation-usage.md Let me know if it works |
Hey @calintamas, I tried it no luck unfortunately. |
Hi @calintamas I have the same issue only in Android. It's related to the change of state of the application (foreground to background for example). I'm using appstate https://reactnative.dev/docs/appstate Thats why @Majid3ziz have the same issue when he ask for permisions or in my case when i request google login. |
@calintamas any updates or way to fix it ? |
Hi Guys, i fork the library and i added validation on rendering the view and my issue was resolved! check my commit on this link |
I haven't got the chance to investigate the issue further. I'll try this weekend and let you know |
@zidun are you using the last version of the react-native-toast-message code? |
Thanks @zidun. My new patch is working. @calintamas @Majid3ziz diff --git a/node_modules/react-native-toast-message/lib/src/components/AnimatedContainer.js b/node_modules/react-native-toast-message/lib/src/components/AnimatedContainer.js
|
Thanks @zidun for the solution! @calintamas is the solution viable to be included in the next release? |
This issue happens on my Android app when I open a url with |
Unfortunately, by doing this So, I'll look into other solutions, but for the moment I can't seem to reproduce the issue either (running on Android 10) |
I've been seeing this issue too, although in a slightly different situation. I have a checkout flow in a Following the modal guide, I have As @claudiozam said, it seems to be related to the state of the application changing. In my case, using AppState.addEventListener, I can see that the state changes to Disabling the native animations fixes this issue for me. I can only assume that when an app is in the background, the native animation system is turned off, and components end up in their default state. I think the Toast's default position is at the top of the screen, and then moved off screen by the animation system. So if the animation system is not active, then the Toast will be shown on screen. Obviously it's not ideal to not use the native animations, but since the slide animation is pretty basic, I don't think it should be much of a problem. @calintamas What do you think of turning off native animations by default, and having a By the way, this is my patch if anyone is interested (use it with patch-package):
|
Thank
Thank you @Menardi working well Hi @calintamas could you add new props for |
This fixed it for me. Thank you! |
This solved my problem. It seems this issue has not been fixed yet in the latest update. |
I think I am going to port this library to Reanimated to get rid of the bare RN Animation System. |
The issue still persist, but solution by @Menardi works! Cheers! |
Add
|
The text was updated successfully, but these errors were encountered: