Add fix for #388 so default JSDialogs don't show up if not wanted

This commit is contained in:
jornh
2014-06-12 19:55:25 +02:00
parent 7f55396353
commit 401101ba4f
+3 -4
View File
@@ -421,7 +421,7 @@ namespace CefSharp
}
bool result;
bool handled;
bool handled = false;
switch (dialog_type)
{
@@ -436,14 +436,13 @@ namespace CefSharp
case JSDIALOGTYPE_PROMPT:
String^ resultString = nullptr;
result = handler->OnJSPrompt(_browserControl, StringUtils::ToClr(origin_url), StringUtils::ToClr(message_text),
handled = handler->OnJSPrompt(_browserControl, StringUtils::ToClr(origin_url), StringUtils::ToClr(message_text),
StringUtils::ToClr(default_prompt_text), result, resultString);
callback->Continue(result, StringUtils::ToNative(resultString));
break;
}
// Unknown dialog type, so we return "not handled".
return false;
return handled;
}
bool ClientAdapter::OnFileDialog(CefRefPtr<CefBrowser> browser, FileDialogMode mode, const CefString& title,