diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-26 20:51:34 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-26 20:51:34 +0000 |
commit | f1a06aede101c6f933ed83d62a71d2a8f81c010c (patch) | |
tree | 01e51e1ef085aef5a1c041edcc2e22689794d659 | |
parent | 94da429847e30db396d4d0409a5ebe91f6bb68d6 (diff) | |
download | chromium_src-f1a06aede101c6f933ed83d62a71d2a8f81c010c.zip chromium_src-f1a06aede101c6f933ed83d62a71d2a8f81c010c.tar.gz chromium_src-f1a06aede101c6f933ed83d62a71d2a8f81c010c.tar.bz2 |
SetInitialFocus() when there's no view to restore to.
http://crbug.com/12555
TEST=Browse to a page. Bring up a new tab (Command-t), should be able to start typing in autocomplete.
http://crbug.com/12556
TEST=With a partial URL entered, switch tabs, and switch back. Should be able to type to replace autocomplete. This does not fix the entire bug.
Review URL: http://codereview.chromium.org/115734
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16906 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_view_mac.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.mm b/chrome/browser/tab_contents/tab_contents_view_mac.mm index 7e5e6e8..5142088 100644 --- a/chrome/browser/tab_contents/tab_contents_view_mac.mm +++ b/chrome/browser/tab_contents/tab_contents_view_mac.mm @@ -142,6 +142,12 @@ void TabContentsViewMac::RestoreFocus() { if (latent_focus_view_.get()) { [[cocoa_view_.get() window] makeFirstResponder:latent_focus_view_.get()]; latent_focus_view_.reset(); + } else { + // TODO(shess): If location-bar gets focus by default, this will + // select-all in the field. If there was a specific selection in + // the field when we navigated away from it, we should restore + // that selection. + SetInitialFocus(); } } |