Skip to content

Commit 199c245

Browse files
ADjenkovADjenkov
ADjenkov
authored and
ADjenkov
committed
fix(dialogs): unable to reopen shared modal view when tab as root
Use topmost frame to show modal view when using tabview as a root
1 parent 767b196 commit 199c245

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: nativescript-angular/directives/dialogs.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { AppHostView } from "../app-host-view";
1717
import { DetachedLoader } from "../common/detached-loader";
1818
import { PageFactory, PAGE_FACTORY } from "../platform-providers";
1919
import { once } from "../common/utils";
20-
import { Frame } from "tns-core-modules/ui/frame/frame";
20+
import { topmost, Frame } from "tns-core-modules/ui/frame";
2121

2222
export interface ModalDialogOptions {
2323
context?: any;
@@ -84,7 +84,7 @@ export class ModalDialogService {
8484

8585
let frame = parentView;
8686
if (!(parentView instanceof Frame)) {
87-
frame = parentView.page && parentView.page.frame;
87+
frame = (parentView.page && parentView.page.frame) || topmost();
8888
}
8989

9090
if (frame) {

0 commit comments

Comments
 (0)