From cb4380582ede7b590e6cec8fc94de75cd93db0ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Cie=C5=9Blak?= Date: Tue, 8 Nov 2022 22:28:37 +0100 Subject: [PATCH] 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 --- .../AppLayouts/Chat/popups/community/CreateChannelPopup.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/app/AppLayouts/Chat/popups/community/CreateChannelPopup.qml b/ui/app/AppLayouts/Chat/popups/community/CreateChannelPopup.qml index 641baf2920..a43a91fdf1 100644 --- a/ui/app/AppLayouts/Chat/popups/community/CreateChannelPopup.qml +++ b/ui/app/AppLayouts/Chat/popups/community/CreateChannelPopup.qml @@ -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; }