Updates:
        Labels: -Type-Bug

Comment #2 on issue 9883 by [email protected]: preventDefault on keydown  
from IME does not work
http://code.google.com/p/chromium/issues/detail?id=9883

Thank you for your bug report, and sorry for my slow response.

Let me clarify your expected behavior before answering your question  
because it is a very complicated problem.

Before answering your question, let me describe the current implementation  
of Chrome with terms of DOM spec. (I realize the current
implementation is not perfect and has some bugs.)
1. When an IME updates its composition string, Chrome sends TextInput  
events (DOM Level 3) as well as KeyDown events, as written in the DOM
spec.
2. When Chrome receives a TextEvent, it creates a text node (denoted as a  
composition node) and add it under the given editable node
(<textarea>, <input>, etc.) when the editable node does not have a  
composition node. Otherwise, it just updates the composition node.
3. When Chrome updates the composition node, it updates the innerHTML/value  
of the editable node to apply the string of the composition
node.

(*1) http://www.w3.org/TR/DOM-Level-3-Events/keyset.html

So, even though a onkeydown() handler cancels a KeyDown event, it does not  
cancel TextInput events. Since TextInput events are not canceled,
Chrome still shows a composition string.
To fix this issue, we should cancel TextInput events when a KeyDown event  
is canceled. Is it your expected behavior?

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to