Split off from http://b/27889099
On https://jsfiddle.net/9n17does with Google Keyboard 5.0+, if you type a few letters in the ContentEditable, press the "Bold" button, then type more letters, the bold state is lost. This is because Google Keyboard commits text to the entire word each time a letter is added, clobbering the mid-word <b> DOM-node and resetting the style to the beginning of the word.
On the internal bug, we've discussed changing Google Keyboard to commit one letter at a time to avoid this, but yukawa@ opposes this because the Android APIs force a whole-word composition in order to support nonstandard underline colors (because that's a span object starting at the beginning of the word). So I plan to land a workaround in Blink to detect when the beginning of the IME commit is the same at what was there already, and restrict the write to only the character(s) at the end that actually changed.
Comment 1 by aelias@chromium.org
, Sep 22 2016Owner: yabinh@chromium.org