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
HI,
i've implemented cefsharp 1.25.0 with WPF (it must support .NET3.5), handle filedownloads and opening external links with IE like below:
bool ILifeSpanHandler.OnBeforePopup(CefSharp.IWebBrowser browser, string url, ref int x, ref int y, ref int width, ref int height)
{
if (url.Contains(home_url))
{
return false;
}else{
Process.Start("IExplore.exe", url);
return true;
}
}
bool IRequestHandler.GetDownloadHandler(IWebBrowser browser, string mimeType, string fileName, long contentLength, ref IDownloadHandler handler)
{
handler = new DownloadHandler(fileName);
return true;
}
in DownloadHandler(string fileName) with savefiledialog i've got messagebox:
...
Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(() =>
{
MessageBoxResult result = MessageBox.Show(Application.Current.MainWindow, msg, "Message1", MessageBoxButton.YesNo, MessageBoxImage.Question);
if (result == MessageBoxResult.No)
{
_templocation = true;
}
}));
...
to handle downloading file to temp location. When download link has target="_self" attribute everything works ok, but when it has target="_blank" a new blank window apperars on top of messagebox.
How can I close from code that new blank window or force to now show it?
The text was updated successfully, but these errors were encountered:
gap032
changed the title
OnBeforePopup return false but new windows open [a target="blank"]?
OnBeforePopup return false but new windows open [a target="_blank"]?
May 5, 2014
HI,
i've implemented cefsharp 1.25.0 with WPF (it must support .NET3.5), handle filedownloads and opening external links with IE like below:
in DownloadHandler(string fileName) with savefiledialog i've got messagebox:
to handle downloading file to temp location. When download link has target="_self" attribute everything works ok, but when it has target="_blank" a new blank window apperars on top of messagebox.
How can I close from code that new blank window or force to now show it?
The text was updated successfully, but these errors were encountered: