diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-04 18:38:20 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-04 18:38:20 +0000 |
commit | c89773baa94fad32238248a9f385adb8f1f1194e (patch) | |
tree | a7a6713991e9f14c74df17dd61d38eeeafe889ac | |
parent | cd9832fe7ee4e4dc28f0b301b4eb614dcbba25e4 (diff) | |
download | chromium_src-c89773baa94fad32238248a9f385adb8f1f1194e.zip chromium_src-c89773baa94fad32238248a9f385adb8f1f1194e.tar.gz chromium_src-c89773baa94fad32238248a9f385adb8f1f1194e.tar.bz2 |
Fix BackSpace not working in Find box.
This regressed with:
http://codereview.chromium.org/99161
I think more work is needed, such as:
1) Figure out if more combinations need to be added.
2) Figure out if we can consolidate the code into
one function, so that we don't need to keep three
ShouldLookupAccelerators in sync (one in TextField,
one in LocationBarView and potentially one in
AutocompleteEditViewWin as well (OnKeyDownOnlyWritable).
I'm not sure what all those magic keyboard constants like
0xBB do, so I think I'll leave the rest of the work to the
person who created the changelist noted above.
BUG=11326
TEST=Open google.com, press About link, press Ctrl+F,
press e, press BackSpace. Chrome should not navigate
back.
Review URL: http://codereview.chromium.org/100347
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15228 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/views/controls/text_field.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/views/controls/text_field.cc b/chrome/views/controls/text_field.cc index 93a41e9..55c2de8 100644 --- a/chrome/views/controls/text_field.cc +++ b/chrome/views/controls/text_field.cc @@ -1164,9 +1164,14 @@ void TextField::AboutToRequestFocusFromTabTraversal(bool reverse) { SelectAll(); } -// We don't translate accelerators for ALT + numpad digit, they are used for -// entering special characters. bool TextField::ShouldLookupAccelerators(const KeyEvent& e) { + // TODO(hamaji): Figure out which keyboard combinations we need to add here, + // similar to LocationBarView::ShouldLookupAccelerators. + if (e.GetCharacter() == VK_BACK) + return false; // We'll handle BackSpace ourselves. + + // We don't translate accelerators for ALT + NumPad digit, they are used for + // entering special characters. if (!e.IsAltDown()) return true; |