summaryrefslogtreecommitdiffstats
path: root/src/openglwidgets/qopenglwidget.cpp
diff options
context:
space:
mode:
authorBartlomiej Moskal <bartlomiej.moskal@qt.io>2025-04-17 07:28:13 +0200
committerBartlomiej Moskal <bartlomiej.moskal@qt.io>2025-05-22 21:47:23 +0200
commit6de8ce2af383c8d164c65ffca7dc845c52e4f2d2 (patch)
tree42c7c7582244df7186ba096a3f88d68d3dd873a9 /src/openglwidgets/qopenglwidget.cpp
parenta867a16ef0a29f9b8b7196d0959e980ee17d7876 (diff)
Android: Set correct initial selection values in EditorInfo
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.9 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>
Diffstat (limited to 'src/openglwidgets/qopenglwidget.cpp')
0 files changed, 0 insertions, 0 deletions