Bug 1137561 part.5 TextEventDispatcher should decide if keypress events should be fired for specific keys r=m_kato

This commit is contained in:
Masayuki Nakano
2016-03-16 13:47:49 +09:00
parent 1bf04ebe04
commit 6a38312b76
2 changed files with 5 additions and 12 deletions

View File

@@ -1514,18 +1514,6 @@ NativeKey::HandleKeyDownMessage(bool* aEventDispatched) const
return defaultPrevented;
}
// Don't dispatch keypress event for modifier keys.
switch (mDOMKeyCode) {
case NS_VK_SHIFT:
case NS_VK_CONTROL:
case NS_VK_ALT:
case NS_VK_CAPS_LOCK:
case NS_VK_NUM_LOCK:
case NS_VK_SCROLL_LOCK:
case NS_VK_WIN:
return defaultPrevented;
}
if (defaultPrevented) {
DispatchPluginEventsAndDiscardsCharMessages();
return true;