You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I reviewed this issue. Unfortunately I could not recreate the problem.
Can you tell us more about the given error or sent us a simple project which shows the problem.
Hi @yclau,
Could you give more details about the abnormality. Could you tell us more about the given error or sent us a simple project which shows the problem.
Hi @yclauhttps://github.com/yclau,
Could you give more details about the abnormality. Could you tell us more about the given error or sent us a simple project which shows the problem.
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com//issues/1809#issuecomment-209308649
Hi @yclau ,
Thank you for your sample project.
I reviewed it and I confirm this is real issue. This problem is scheduled for fixing.
I am attaching link to the project repository: https://github.com/tsonevn/iOSModalPageAlert.git
I am using 2.2.1, still have this problem. How come?
Just to clarify: we have regular modal pop-ups in the app, works well on Android. On iOS, the pop-ups show up as full-screens and, when the next page is called, app locks up. And the console shows this message of view not being in the window hierarchy.
Is there a workaround?
Hi @dlucidone,
This issue has been fixed with NativeScript 3.0. For your convenience, I update the sample project here. You could clone it and test it on your side.
Hi, I've run into a similar problem on 4.1.1 I am trying to display a confirmation dialog from a modal, however, no console error appears, the dialog just simply does not display.
Hi @BMwanza,
Can you provide more info about the error, which has appeared in the console? Also, send us a sample project, where the problem can be reproduced.
Hey I just ran into this issue while trying to work with a different library but I think what I found applies here -- the issue might be a limitation of iOS -- in my case I was trying to call .scan of the nativescript-barcodescanner project, but it will attempts to open a new modal, and at that point I had an modal already open. The error I was seeing:
Warning: Attempt to present <QRCodeReaderViewController: 0x14fe80140> on <UINavigationControllerImpl: 0x15017b800> whose view is not in the window hierarchy!
For me, I fixed this by calling this.$modal.close() in the ios case inside the modal I had open, and refactored the rest of the code as necessary.
Can someone check, does it works on iOS? I've seen message in one of the community chat, that someone can't open action dialog from modal in iOS (without any errors in console).
I don't have enviroment to check this. But I will need it in the near future.
Ups, sorry for buzzing 😊.
Just found the solution - instead of topmost().page.showModal must be used topmost().currentPage.showModal, and everything works as expected!
I have the issue on my Angular app. I'm opening a modal from my home page and on that modal I'm trying to open a confirm dialog, but that doesn't work. When first navigating away from the homepage, then returning back to the homepage and opening the modal + confirm, everything works as expected. The home page is lazily loaded.
Activity
tsonevn commentedon Mar 23, 2016
Hi @NordlingArt,
I reviewed this issue. Unfortunately I could not recreate the problem.
Can you tell us more about the given error or sent us a simple project which shows the problem.
yclau commentedon Apr 7, 2016
I meet this error too. In android , it work probably but in IOS , come out same error.
tsonevn commentedon Apr 13, 2016
Hi @yclau,
Could you give more details about the abnormality. Could you tell us more about the given error or sent us a simple project which shows the problem.
yclau commentedon Apr 18, 2016
zzz zzzz has shared a?OneDrive?file with you. To view it, click the link below.
https://onedrive.live.com/redir?resid=AB701A01965B0E3C!549&authkey=!AGolb1iVZauJz5U
[https://r1.res.office365.com/owa/prem/images/dc-zip_20.png]https://onedrive.live.com/redir?resid=AB701A01965B0E3C!549&authkey=!AGolb1iVZauJz5U
Project.ziphttps://onedrive.live.com/redir?resid=AB701A01965B0E3C!549&authkey=!AGolb1iVZauJz5U
Hi,
Sorry for late reply, the attachment is my example project.
From: tsonevn notifications@github.com
Sent: Wednesday, April 13, 2016 4:45 PM
To: NativeScript/NativeScript
Cc: yclau
Subject: Re: [NativeScript/NativeScript] Calling modules inside modal pages gives "hierarchy" error (#1809)
Hi @yclauhttps://github.com/yclau,
Could you give more details about the abnormality. Could you tell us more about the given error or sent us a simple project which shows the problem.
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com//issues/1809#issuecomment-209308649
tsonevn commentedon Apr 18, 2016
Hi @yclau ,
Thank you for your sample project.
I reviewed it and I confirm this is real issue. This problem is scheduled for fixing.
I am attaching link to the project repository:
https://github.com/tsonevn/iOSModalPageAlert.git
[-]Calling modules inside modal pages gives "hierarchy" error[/-][+]Unable to show dialog from a modal page[/+]Fixed: Unable to show dialog from a modal page
4 remaining items
nmandyam commentedon Sep 26, 2016
I am using 2.2.1, still have this problem. How come?
Just to clarify: we have regular modal pop-ups in the app, works well on Android. On iOS, the pop-ups show up as full-screens and, when the next page is called, app locks up. And the console shows this message of view not being in the window hierarchy.
Is there a workaround?
dlucidone commentedon May 5, 2017
I'm having the same issue is there any fix for this?
tsonevn commentedon May 5, 2017
Hi @dlucidone,
This issue has been fixed with NativeScript 3.0. For your convenience, I update the sample project here. You could clone it and test it on your side.
BMwanza commentedon Aug 3, 2018
Hi, I've run into a similar problem on 4.1.1 I am trying to display a confirmation dialog from a modal, however, no console error appears, the dialog just simply does not display.
tsonevn commentedon Aug 6, 2018
Hi @BMwanza,
Can you provide more info about the error, which has appeared in the console? Also, send us a sample project, where the problem can be reproduced.
t3hmrman commentedon Oct 2, 2018
Hey I just ran into this issue while trying to work with a different library but I think what I found applies here -- the issue might be a limitation of iOS -- in my case I was trying to call
.scanof the nativescript-barcodescanner project, but it will attempts to open a new modal, and at that point I had an modal already open. The error I was seeing:For me, I fixed this by calling
this.$modal.close()in theioscase inside the modal I had open, and refactored the rest of the code as necessary.webleaf commentedon Dec 8, 2018
Can someone check, does it works on iOS? I've seen message in one of the community chat, that someone can't open action dialog from modal in iOS (without any errors in console).
I don't have enviroment to check this. But I will need it in the near future.
tsonevn commentedon Dec 11, 2018
Hi @webleaf,
I tested the scenario with the modal view and the dialogs with our https://github.com/NativeScript/nativescript-sdk-examples-js app and everything seems to work as expected on iOS
ycherniavskyi commentedon Jul 2, 2019
I trap into this issue with NS 5.4. Yes, the structure of my layout is not trivial, but I think that dialog must work in any circumstances.
I extract my layout in playground.
As you could see from source code dialog operation depends on which view modal is opened. Unfortunately, in my case have access only to topmost frame.
ycherniavskyi commentedon Jul 2, 2019
@tsonevn maybe it is better to open new issue?
ycherniavskyi commentedon Jul 2, 2019
Ups, sorry for buzzing 😊.
Just found the solution - instead of
topmost().page.showModalmust be usedtopmost().currentPage.showModal, and everything works as expected!jelledijkstra97 commentedon Jul 9, 2019
I have the issue on my Angular app. I'm opening a modal from my home page and on that modal I'm trying to open a confirm dialog, but that doesn't work. When first navigating away from the homepage, then returning back to the homepage and opening the modal + confirm, everything works as expected. The home page is lazily loaded.
BMwanza commentedon Aug 26, 2019
Dialogs are not showing for me in the following case:
I'm using the showModal() method in Modal A to go to Modal B.
Dialogs are able to show in Modal A, but not in Modal B.
Or maybe I am miss using the Modals? Are you able to go from Modal A to Modal B using the showModal method?