Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.15.8, 6.4.2
-
None
Description
When TextInput contains "\n" new line character, text selection breaks.
For example, try to paste this — with or without quotes, I just had to add "" here because thanks to Jira markup — in TextInput or TextField, and select part of the word:
" симпатия"
A little explanation to the screenshot:
The "\n" character was accidentally prepended by a dictionary software. It breaks text selection by shifting rest of the characters to the right. Actually, both TextInput and Field share this bug (but not QtWidgets LineEdit), but I deleted "\n" from TextInput just to show how it "should" look like
The more "\n" characters you have in there, the more rest of the text will be shifted to the right after start of selection.
Minimal reproducible example in QML:
import QtQuick.Controls 2.15 TextField { text: "\nabc" }