summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authormukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-18 11:42:18 +0000
committermukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-18 11:42:18 +0000
commitd9157a3249d36baabb27f85b52eaef7a0ed5fc9c (patch)
tree7124a7ebb4aefa121ef2c9c0b7bd29d2e1288ffd /ui
parent14275a59bad592524ec04451787d305748b99199 (diff)
downloadchromium_src-d9157a3249d36baabb27f85b52eaef7a0ed5fc9c.zip
chromium_src-d9157a3249d36baabb27f85b52eaef7a0ed5fc9c.tar.gz
chromium_src-d9157a3249d36baabb27f85b52eaef7a0ed5fc9c.tar.bz2
Do not consume alt-left/right keys in textfield.
It doesn't make any effects on editing, and some other modules can use these keybinds. R=sky@chromium.org BUG=136659 TEST=manually done Review URL: https://chromiumcodereview.appspot.com/10703139 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147214 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/views/controls/textfield/native_textfield_views.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/views/controls/textfield/native_textfield_views.cc b/ui/views/controls/textfield/native_textfield_views.cc
index 746d2d4..c5b27a4 100644
--- a/ui/views/controls/textfield/native_textfield_views.cc
+++ b/ui/views/controls/textfield/native_textfield_views.cc
@@ -961,6 +961,11 @@ bool NativeTextfieldViews::HandleKeyEvent(const KeyEvent& key_event) {
break;
case ui::VKEY_RIGHT:
case ui::VKEY_LEFT:
+ // We should ignore the alt-left/right keys because alt key doesn't make
+ // any special effects for them and they can be shortcut keys such like
+ // forward/back of the browser history.
+ if (key_event.IsAltDown())
+ break;
model_->MoveCursor(
control ? gfx::WORD_BREAK : gfx::CHARACTER_BREAK,
(key_code == ui::VKEY_RIGHT) ? gfx::CURSOR_RIGHT : gfx::CURSOR_LEFT,