Previously, when a TextInput field was pre-filled with text, focusing the input would cause the keyboard to behave incorrectly. Typing any character would duplicate the last word. This appeared to be caused by the keyboard reapplying a composition segment (e.g., the last word), without a proper pre-edit region defined—resulting in the word being appended again. This issue is resolved by correctly setting EditorInfo.initialSelStart and EditorInfo.initialSelEnd when the InputConnection is created. Properly initializing these values ensures the IME (input method editor) can synchronize with the text field correctly. It can be found in [0]documentation: "Also, take good care to fill in the EditorInfo object correctly and in its entirety, so that the connected IME can rely on its values. For example, EditorInfo.initialSelStart and EditorInfo.initialSelEnd members must be filled in with the correct cursor position for IMEs to work correctly with your application." [0]https://developer.android.com/reference/android/view/View#onCreateInputConnection(android.view.inputmethod.EditorInfo) Pick-to: 6.8 6.5 Fixes: QTBUG-135481 Change-Id: I5ae5a2fb22f285154ba3857033506d367bfd7642 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> (cherry picked from commit 6de8ce2af383c8d164c65ffca7dc845c52e4f2d2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%