2011-03-24 Jon Lee <jonlee@apple.com>

        Reviewed by Darin Adler.

        WebKit2: Tabbing from the last focused field to a non-webpage element leaves the selection in a weird state
        <rdar://problem/8553962>

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::setFocused): When the page loses focus, clear out any selection in the frame

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 33fc8808
2011-03-24 Jon Lee <jonlee@apple.com>
Reviewed by Darin Adler.
WebKit2: Tabbing from the last focused field to a non-webpage element leaves the selection in a weird state
<rdar://problem/8553962>
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setFocused): When the page loses focus, clear out any selection in the frame
2011-03-24 Brian Weinstein <bweinstein@apple.com>
Rubber-stamped by Sam Weinig.
......
......@@ -1126,6 +1126,8 @@ void WebPage::viewWillEndLiveResize()
void WebPage::setFocused(bool isFocused)
{
if (!isFocused)
m_page->focusController()->focusedOrMainFrame()->selection()->clear();
m_page->focusController()->setFocused(isFocused);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment