Skip to content
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

ChildBrowser - IOS 1.5 *** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <NSInvalidArgumentException> Application tried to present modally an active controller <MainViewCont #89

Open
Ruddiger opened this issue Jul 5, 2012 · 0 comments

Comments

@Ruddiger
Copy link

Ruddiger commented Jul 5, 2012

This happend in IOS because it won't let you re-add a modal item and subsequent calls to showWebPage try to recall the childBrowser. A quick fix is to do the following in showWebPage (ChildBrowserCommand.m):

#ifdef CORDOVA_FRAMEWORK
    CDVViewController* cont = (CDVViewController*)[ super viewController ];
    childBrowser.supportedOrientations = cont.supportedOrientations;
    childBrowser.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
    @try {
        [ cont presentModalViewController:childBrowser animated:YES ];
    }@catch(NSException * e){
        NSLog(@"ALready visible");
    }
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant