summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-08 18:02:15 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-08 18:02:15 +0000
commit04a06006aa5015719724d119a08a7f9b1ca86db1 (patch)
treee6e2400976b9b5fb3d55a24790bf0bf2c9520ea4 /views
parent4df90c1dd1f4ca74f0b9644b58e9c9e23f7d01a7 (diff)
downloadchromium_src-04a06006aa5015719724d119a08a7f9b1ca86db1.zip
chromium_src-04a06006aa5015719724d119a08a7f9b1ca86db1.tar.gz
chromium_src-04a06006aa5015719724d119a08a7f9b1ca86db1.tar.bz2
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
Diffstat (limited to 'views')
-rw-r--r--views/controls/textfield/textfield.cc6
1 files changed, 3 insertions, 3 deletions
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;