-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
6.5.0, 6.8.0, 6.9.0, 6.10.0 FF
-
None
From QInputMethodEvent::Selection documentation:
If set, the edit cursor should be moved to the specified position in the editor text contents. In contrast with Cursor, this attribute does not work on the preedit text, but on the surrounding text. The cursor will be moved after the commit string has been committed, and the preedit string will be located at the new edit position. The start position specifies the new position and the length variable can be used to set a selection starting from that point. The value is unused.
This does not work anymore causing a regression (for example) in Virtual Keyboard where you cannot set cursor to inside a pre-edit text anymore by clicking somewhere on the pre-edit text.
See the attached app which demonstrates the API call. It sends QInputMethodEvent with commit string "Hello" and a Selection attribute start=2. The expected outcome would be to have "Hello" in the text field and cursor set to 2. But since https://codereview.qt-project.org/c/qt/qtdeclarative/+/354904 the declarative text input does not honor the Selection start attribute anymore. In contrast, a Selection without the commit string does move the cursor as expected.
- resulted from
-
QTBUG-94253 When an inputmask is set on a TextInput then it will overwrite the first character if the cursor starts from position 0 after typing the second character
-
- Closed
-