1

ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'getFragmentManager' of undefined. This error is popping when I run my nativescript angular application. It says something wrong in my account.component.ts. Why this error is occurs and how to fix this issue?

Click here to see error image

Give any solution for this issue.

ts file:

ngOnInit(){

    if (isAndroid) {
            
            
             const dialogFragment = application.android.foregroundActivity.getFragmentManager().findFragmentByTag("dialog");
            
            if (dialogFragment) {
                utils.ad.dismissSoftInput(dialogFragment.getDialog().getCurrentFocus());
            } else {
                utils.ad.dismissSoftInput();
            }
     }
}
Naveen Kumar
  • 373
  • 1
  • 9

1 Answers1

0

Is seems your problem is discussed here: https://github.com/NativeScript/NativeScript/issues/5307

oded bartov
  • 391
  • 1
  • 2
  • 9