summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-08 19:54:52 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-08 19:54:52 +0000
commitbd0b334ad288b039b6576db5877a57796d20c517 (patch)
tree39b1a1abfe2363454822b808807deb80827ba02e /chrome/browser/views
parentacc84f9344ad1743183036640f255d60c589b613 (diff)
downloadchromium_src-bd0b334ad288b039b6576db5877a57796d20c517.zip
chromium_src-bd0b334ad288b039b6576db5877a57796d20c517.tar.gz
chromium_src-bd0b334ad288b039b6576db5877a57796d20c517.tar.bz2
External contribution from developer0420@gmail.com. Pressing enter in
the bookmark bubble when focus is on the edit button should start editing. BUG=2863 TEST=Bring up the bookmark bubble, move focus to the edit button and press enter. Make sure the editor comes up. Review URL: http://codereview.chromium.org/6594 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3036 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/bookmark_bubble_view.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/views/bookmark_bubble_view.cc b/chrome/browser/views/bookmark_bubble_view.cc
index b70416c..ffb9817 100644
--- a/chrome/browser/views/bookmark_bubble_view.cc
+++ b/chrome/browser/views/bookmark_bubble_view.cc
@@ -150,8 +150,10 @@ bool BookmarkBubbleView::AcceleratorPressed(
const ChromeViews::Accelerator& accelerator) {
if (accelerator.GetKeyCode() != VK_RETURN)
return false;
-
- Close();
+ if (edit_button_->HasFocus())
+ ButtonPressed(edit_button_);
+ else
+ ButtonPressed(close_button_);
return true;
}
@@ -183,7 +185,7 @@ void BookmarkBubbleView::Init() {
l10n_util::GetString(IDS_BOOMARK_BUBBLE_OPTIONS));
edit_button_->SetListener(this);
- close_button_ = new NativeButton(l10n_util::GetString(IDS_CLOSE));
+ close_button_ = new NativeButton(l10n_util::GetString(IDS_CLOSE), true);
close_button_->SetListener(this);
parent_combobox_ = new ComboBox(&parent_model_);