Preserve composing range if possible on sel change (#67197)
When setting the TextSelection in a TextEditingController, preserve the
composing range so long as the new selection is:
* a collapsed selection; in other words, a cursor rather than a
selection with an extent. A selection with an extent is not
permitted when composing.
* within the composing region. Moving the cursor outside the composing
region ends composing mode.
When using physical keyboards for input with an IME, users expect to be
able to navigate using the cursor within the composing region with the
arrow keys in order to edit text in the composing range.
As an example, a user might erroneously enter the composing text
にほんごにゅうろく in kana, then hit the left arrow, followed by
backspace in order to delete the ろ, then input りょ in order to
generate the correct composing text にほんごにゅうりょく, before then
hitting the conversion key to convert to the kanji text 日本語入力 and
commit.
Showing
Please register or sign in to comment