summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-03 22:29:35 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-03 22:29:35 +0000
commit05f61ef008ca957759709431c3688881159fad14 (patch)
tree73363b2b42bc6b39316d3d5eb6fe7a0af31d0d2f
parent737d8a62d54a2475fa0fc23a681a8d5293096754 (diff)
downloadchromium_src-05f61ef008ca957759709431c3688881159fad14.zip
chromium_src-05f61ef008ca957759709431c3688881159fad14.tar.gz
chromium_src-05f61ef008ca957759709431c3688881159fad14.tar.bz2
Mac: fix Esc-killing-Omnibox-focus problem (after find bar shown).
BUG=33094 TEST=Open a new browser window; Cmd-F to show the find bar; Esc to hide the find bar; focus the Omnibox; press Esc a few times (with or without editing its contents); focus should remain in the Omnibox. Make sure showing/hiding/using the find bar works normally. Review URL: http://codereview.chromium.org/561055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38030 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/cocoa/find_bar_cocoa_controller.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/find_bar_cocoa_controller.mm b/chrome/browser/cocoa/find_bar_cocoa_controller.mm
index 21582c1..05ae37a 100644
--- a/chrome/browser/cocoa/find_bar_cocoa_controller.mm
+++ b/chrome/browser/cocoa/find_bar_cocoa_controller.mm
@@ -304,6 +304,10 @@ const float kFindBarCloseDuration = 0.15;
// is still on the stack.
DCHECK(animation == currentAnimation_.get());
[currentAnimation_.release() autorelease];
+
+ // If the find bar is not visible, make it actually hidden, so it'll no longer
+ // respond to key events.
+ [findBarView_ setHidden:![self isFindBarVisible]];
}
@end
@@ -328,10 +332,15 @@ const float kFindBarCloseDuration = 0.15;
if (!animate) {
[findBarView_ setFrame:endFrame];
+ [findBarView_ setHidden:![self isFindBarVisible]];
currentAnimation_.reset(nil);
return;
}
+ // If animating, ensure that the find bar is not hidden. Hidden status will be
+ // updated at the end of the animation.
+ [findBarView_ setHidden:NO];
+
// Reset the frame to what was saved above.
[findBarView_ setFrame:startFrame];
NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys: