-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Modal.onRequestClose on iOS is never called #10662
Comments
Actually the description for onRequestClose is wrong for quite a long time, it's not a function that will be called once the modal has been dismissed, but a function that will be called once you press the hardware back button, so it's invalid on iOS. I'll send a PR then. |
Thanks, it would be nice to have a callback once the dialog is fully dismissed but I will use an alternative modal for now. |
Summary: further discussion: should there be a `onClose` or `onClosed` to pair with `onShow`? which would make a workaround for facebook#10471 much easier Closes facebook#10669 Differential Revision: D4133832 Pulled By: hramos fbshipit-source-id: 644a5bb6b9da697c81fc96ae4da196ba5b4050cb
@Paul-Todd what's the alternative you used? |
ah...got this issue too... |
I put callbacks for the ok and cancel buttons in my modal and then used that to hide the modal. I think we should have the onRequestClose method also work on iOS so we can capture the post modal close scenario. I would have liked to have it so I could display a toast once a record was deleted. |
Summary: further discussion: should there be a `onClose` or `onClosed` to pair with `onShow`? which would make a workaround for facebook#10471 much easier Closes facebook#10669 Differential Revision: D4133832 Pulled By: hramos fbshipit-source-id: 644a5bb6b9da697c81fc96ae4da196ba5b4050cb
/** only for android |
This has application on tvOS. Neither |
I also couldn't listen for the 'menu' event in TVEventHandler. It never fired. It's like the modal is intercepting the menu button event and not propagating it. |
--- Please use this template, and delete everything above this line before submitting your issue ---
Description
onRequestClose is never called when the dialog is dismissed on iOS. The documentation claims it is an optional callback on iOS.
Can someone clarify if the onRequestClose is supposed to be not implemented on iOS or if this is a bug?
Reproduction
Create a simple project with a modal
Add the onRequestClose property
The alert is not fired after the dialog has closed.
Additional Information
The text was updated successfully, but these errors were encountered: