fix(CreateChannelPopup): cursor not jumping to the end

When typing at non-end position (in channel name filed) cursor
is no longer jumping to the end. Additionally binding loop
on "contentWidth" is fixed.

Closes: #7805
This commit is contained in:
Michał Cieślak 2022-11-08 22:28:37 +01:00 committed by Alexandra Betouni
parent 1ca1866993
commit cb4380582e
1 changed files with 3 additions and 3 deletions

View File

@ -98,7 +98,6 @@ StatusDialog {
Column {
id: content
width: parent.width
StatusInput {
id: nameInput
@ -108,8 +107,9 @@ StatusDialog {
placeholderText: qsTr("# Name the channel")
input.onTextChanged: {
input.text = Utils.convertSpacesToDashesAndUpperToLowerCase(input.text);
input.cursorPosition = input.text.length
const cursorPosition = input.cursorPosition
input.text = Utils.convertSpacesToDashesAndUpperToLowerCase(input.text)
input.cursorPosition = cursorPosition
if (root.channelEmoji === "") {
input.letterIconName = text;
}