From c3fd7e5aed154ba6c45d4408597460731d5b32e3 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Mon, 6 Jun 2011 15:38:19 +0000 Subject: [PATCH] Fix focus on navigation when no CefFocusHandler is provided. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@253 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- libcef/browser_impl.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libcef/browser_impl.cc b/libcef/browser_impl.cc index 1e9c2fccc..51887f2b9 100644 --- a/libcef/browser_impl.cc +++ b/libcef/browser_impl.cc @@ -928,7 +928,8 @@ bool CefBrowserImpl::UIT_Navigate(const BrowserNavigationEntry& entry, if (client_.get()) { CefRefPtr handler = client_->GetFocusHandler(); - if (handler.get() && !handler->OnSetFocus(this, false)) { + if (!handler.get() || + (handler.get() && !handler->OnSetFocus(this, false))) { // Restore focus to the main frame prior to loading new request. // This makes sure that we don't have a focused iframe. Otherwise, that // iframe would keep focus when the SetFocus called immediately after