From bd0b334ad288b039b6576db5877a57796d20c517 Mon Sep 17 00:00:00 2001 From: "sky@google.com" Date: Wed, 8 Oct 2008 19:54:52 +0000 Subject: 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 --- chrome/browser/views/bookmark_bubble_view.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'chrome/browser/views/bookmark_bubble_view.cc') 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_); -- cgit v1.1