Composition and/or DOM change should be notified to the browser |
|
Issue descriptionThis was pointed out in code review: https://codereview.chromium.org/2370663002/. There may be cases where composition and DOM changes should be notified to the browser, by cancelling composition or updating IME app's internal state. If the composition/DOM change accompanies selection change, it will notify the browser process, so those cases should be ruled out. Example: Composition [abc] becomes [aBc] by replacing nodeValue of the text node in the middle. (Not sure if we need to update DOM change outside composition as well.. yosin@, could you add your thought?) But there may still be some conflict if there was further composition update from browser process, so we should be careful. Issue 650204 mentions a similar synchronization problem although not same. As for the mechanism to detect DOM change from InputMethodController, yosin@ mentioned SynchronousMutationObserver (https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/Source/core/dom/SynchronousMutationObserver.h)
,
Jan 17 2017
> 2 Remove the element enclosing composition > 3 Hide the element enclosing composition; this is the similar to #1, but it is done by CSS change. These both ought to cause the textbox to get unfocused, which should set off a cascade of browser notifications as natural side effects. According to my reading of http://w3c.github.io/html/editing.html#focus-fixup-rule-one , this should already be the case: "When the designated focused area of a control group is removed from that control group in some way (e.g., it stops being a focusable area, it is removed from the DOM, it becomes expressly inert, etc) [...]" |
|
►
Sign in to add a comment |
|
Comment 1 by yosin@chromium.org
, Jan 17 2017