-
-
Notifications
You must be signed in to change notification settings - Fork 245
Can't open modal within modal due to ViewHierarchy error on IOS. #612
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
Comments
Likely related to this change: #558 To confirm, can you manually change the this$1.$el.nativeView... instead of |
Yeah, I'm having this same issue after updating to this version. |
Thanks Rigor, this fix is working for me!
|
Good to know. However I'm a little unsure what to do about it - if we revert the change, we break the other now fixed issue, if we keep it this way - we introduce this limitation. 🙄 |
What issues have you fixed with this @rigor789 |
I think the best approach would be to add a new import Modal from "./Modal";
this.$showModal(Modal, {
fullscreen: true,
target: this
}) |
I think that'd be great! I'm happy to help contribute if you need the help. @rigor789 |
@drewjbartlett if you want to, sure submit a PR - I'll get it merged/released. What I'm thinking is adding the nativescript-vue/platform/nativescript/plugins/modal-plugin.js Lines 68 to 71 in cdb9188
and setting it to this.$root by default but allow overriding by user. To do that, we would add the target to the first empty object in Object.assign - {} and then change the this.$root to options.target
That would be the rough approach - I would like to allow passing in a Vue component instance, an element, or a nativeView. A similar thing was done for the nativescript-vue/platform/nativescript/plugins/navigator-plugin.js Lines 23 to 38 in cdb9188
|
Same for me |
@rigor789 - I have a working fix, however there doesn't seem to be a clear way to test this in the contributing guides. Maybe we can chat about that on my PR? I'll open shortly. |
We are locking this issue because it has been closed for more than 14 days. If the issue comes up again please open a new issue with additional details. |
Version
2.5.0
Reproduction link
https://play.nativescript.org/?template=play-vue&id=mQF8k3&v=3
Platform and OS info
Android 8 / nativescript 6.5 / 5.4.15-arch1-1
Steps to reproduce
What is expected?
You should see a new popup open.
What is actually happening?
You get the error:
Closing modal 1 and openning modal 2 / using navigation are not viable workarounds for this issue if what you intend for the user is to see modal 1 when they close modal 2 and
Please see this issue in nativescript repository.
Please see this stackoverflow question.
The text was updated successfully, but these errors were encountered: