From 04a06006aa5015719724d119a08a7f9b1ca86db1 Mon Sep 17 00:00:00 2001 From: "jcampan@chromium.org" Date: Thu, 8 Oct 2009 18:02:15 +0000 Subject: Backspace should not be processed as an accelerator in textfield, so it really removes the previous character. BUG=11326 TEST=In Linux toolkit views, navigate few pages in a tab (so you have some history). Open the find box (Ctrl-F) type some text, then backspace. Pressing backspace should have the normal behavior and should not trigger a navigation back. Review URL: http://codereview.chromium.org/265038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28410 0039d316-1c4b-4281-b951-d872f2087c98 --- views/controls/textfield/textfield.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'views') diff --git a/views/controls/textfield/textfield.cc b/views/controls/textfield/textfield.cc index f06eb3d..e22da4d 100644 --- a/views/controls/textfield/textfield.cc +++ b/views/controls/textfield/textfield.cc @@ -206,15 +206,15 @@ void Textfield::AboutToRequestFocusFromTabTraversal(bool reverse) { } bool Textfield::SkipDefaultKeyEventProcessing(const KeyEvent& e) { -#if defined(OS_WIN) // TODO(hamaji): Figure out which keyboard combinations we need to add here, // similar to LocationBarView::SkipDefaultKeyEventProcessing. base::KeyboardCode key = e.GetKeyCode(); if (key == base::VKEY_BACK) return true; // We'll handle BackSpace ourselves. - // We don't translate accelerators for ALT + NumPad digit, they are used for - // entering special characters. We do translate alt-home. +#if defined(OS_WIN) + // We don't translate accelerators for ALT + NumPad digit on Windows, they are + // used for entering special characters. We do translate alt-home. if (e.IsAltDown() && (key != base::VKEY_HOME) && win_util::IsNumPadDigit(key, e.IsExtendedKey())) return true; -- cgit v1.1