Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1382)

Unified Diff: third_party/WebKit/Source/core/input/KeyboardEventManager.cpp

Issue 2121843002: Don't perform the default action when keyCode is 229. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add const definition Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp b/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
index 185a0664514f3bcd94012ca3f4ed2f39c5f549e5..59ee1921e92970ad62758ddce2607bd000834750 100644
--- a/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
@@ -24,6 +24,8 @@ namespace blink {
namespace {
+const int kVKeyProcessKey = 229;
+
WebFocusType focusDirectionForKey(const String& key)
{
WebFocusType retVal = WebFocusTypeNone;
@@ -162,6 +164,11 @@ void KeyboardEventManager::defaultKeyboardEventHandler(
m_frame->editor().handleKeyboardEvent(event);
if (event->defaultHandled())
return;
+
+ // Do not perform the default action when inside a IME composition context.
+ // TODO(dtapuska): Replace this with isComposing support. crbug.com/625686
+ if (event->keyCode() == kVKeyProcessKey)
+ return;
if (event->key() == "Tab") {
defaultTabEventHandler(event);
} else if (event->key() == "Backspace") {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698