I open a new webview window by call createWebviewWithRequest. And it opens well. But I have an issue.
When this webview window is close, my window app is closed too. Here is my code to open new webview window
- (WebView*)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request
{
originRect = appDelegate.window.frame;
[[webview mainFrame]loadRequest:request];
return webview;
}
- (void)webViewShow:(WebView *)sender
{
// set size window app to origin rect
[appDelegate.window setFrame:originRect display:YES];
}
The webview has a Submit button. When user click on this button, webview will be closed.
How can I prevent my window app is not closed when the webview window is closed?
Do you have any ideas?