-
-
Notifications
You must be signed in to change notification settings - Fork 72
Opening image picker from within modal #79
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
Is there any update on this ? |
That's an iOS-only problem. I am also looking forward to a fix. I just implemented a very ugly workaround for iOS:
To show the modal the second time, a timeout is needed, because we cannot display the modal inside the close modal function (the modal is still open):
|
Welp, just saw the same problem here: NativeScript/NativeScript#3195 And surprisingly, the workaround is exactly the same as mine. Although in my opinion, the timeout is a little wobbly... Anyway, if Issue 3195 cannot be resolved, it maybe makes sense to handle this case like shown. But NativeScript could make it easier for us and handle this case automatically on iOS. |
+1 |
Hi guys, a new version of the plugin is out 6.0.0, and it now supports opening the image picker in ios from a modal page without complicated workarounds. All you need is to pass the modal page from which you open the picker to the |
Can someone show an example here with Angular, it's not working for me on the IOS
i assume a ref of the page is like that
|
@mhmo91 |
As far as I can tell this has not been solved for Angular. Simply passing in the |
@tbozhikov i haven't really got a chance to try your resolution, i had to the change the structure to routing instead of modals, would be nice if someone can see this solved though.. )) |
Check for presentedViewController and present from it. Allow opening from already presented modal. Addresses issue NativeScript#214 and NativeScript#79
for everyone using
|
Even with the latest version of this plugin, I am still not able to open the ImagePicker in an existing modal. Here is my example project that:
It does open the ImagePicker but it will open an new modal on top of the existing one. Note: the Page object I get does seem to be the top element, since its parent is undefined and it does contain the Any ideas? EDIT: is what I am seeing actually expected behavior? I was under the impression that the additional |
I was facing the same issue with the error of window hierarchy, I Solved it by just adding a Timeout of 10 milliseconds.
|
When the image picker is triggered from within a page that was opened using
showModal()
, the picker is loaded behind the page. Is there any way to work around this?The text was updated successfully, but these errors were encountered: