Fixed crash on windows deactivate

This commit is contained in:
jmn
2013-06-06 16:26:22 +01:00
parent b8eaa573b3
commit 249dcab605
+4 -7
View File
@@ -854,14 +854,11 @@ namespace Wpf
void WebView::HidePopup()
{
CefRefPtr<CefBrowser> browser;
if (TryGetCefBrowser(browser))
if (_popup != nullptr && _popup->IsOpen && TryGetCefBrowser(browser))
{
if(_popup != nullptr && _popup->IsOpen)
{
// This is the only decent way I found to hide popup properly so that clicking again on the a drop down (<select>)
// opens it.
browser->SendMouseClickEvent(-1,-1, CefBrowser::MouseButtonType::MBT_LEFT, false, 1 );
}
// This is the only decent way I found to hide popup properly so that clicking again on the a drop down (<select>)
// opens it.
browser->SendMouseClickEvent(-1,-1, CefBrowser::MouseButtonType::MBT_LEFT, false, 1 );
}
}