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
Describe the bug
When we open Nativescript modal, then close it and it returns a result to the caller component, we found that the modal is not completely closed or destroyed and it causes unexpected navigation. I modified sample master detail app to demonstrate the issue in the repository below https://github.com/banchasf/nativescript-modal.git
With the code in the repository, we expect the navigation flow to be master -> modal -> detail. In actual result, we get master -> modal -> detail -> master. We can have workaround by using setTimeout to wait until the modal is completely closed. However when the app is in the situation that the host mobile device has low available memory, it needs more delay time to close the modal completely.
To Reproduce
Run the app with the command npx ns run ios --env.aot
Tap a car in the list
Tap to proceed to detail
Expected behavior
When we tap to proceed to the detail, the app should navigate to detail page but it navigate to detail page then redirect back to master page.
Additional context
For the quick fix, I provided a solution in the branch 'navigation' of the repository to have an option to skip navigation history adjustment.
The text was updated successfully, but these errors were encountered:
banchasf
changed the title
ModalDialogService cause navigation issue
ModalDialogService causes navigation issue
Jul 28, 2022
Thanks for reporting it. I'll try to take a look this week or the next. In the meantime you can check the new modal service which follows closely the angular material spec (we've been meaning to deprecate the old one for a while now, since the new one is much more complete and powerful).
Overview
ModalDialogService cause navigation issue. Sample code is provided in https://github.com/banchasf/nativescript-modal.git
Environment
Describe the bug
When we open Nativescript modal, then close it and it returns a result to the caller component, we found that the modal is not completely closed or destroyed and it causes unexpected navigation. I modified sample master detail app to demonstrate the issue in the repository below
https://github.com/banchasf/nativescript-modal.git
With the code in the repository, we expect the navigation flow to be master -> modal -> detail. In actual result, we get master -> modal -> detail -> master. We can have workaround by using setTimeout to wait until the modal is completely closed. However when the app is in the situation that the host mobile device has low available memory, it needs more delay time to close the modal completely.
To Reproduce
Expected behavior
When we tap to proceed to the detail, the app should navigate to detail page but it navigate to detail page then redirect back to master page.
Sample project
Code is in https://github.com/banchasf/nativescript-modal.git
Additional context
For the quick fix, I provided a solution in the branch 'navigation' of the repository to have an option to skip navigation history adjustment.
The text was updated successfully, but these errors were encountered: