diff --git a/linphone-desktop/ui/modules/Common/Form/Fields/TextField.qml b/linphone-desktop/ui/modules/Common/Form/Fields/TextField.qml index b17fcc6f2..836f67613 100644 --- a/linphone-desktop/ui/modules/Common/Form/Fields/TextField.qml +++ b/linphone-desktop/ui/modules/Common/Form/Fields/TextField.qml @@ -11,10 +11,14 @@ import Common.Styles 1.0 Controls.TextField { id: textField + // --------------------------------------------------------------------------- + property alias icon: icon.icon property string error: '' property var tools + // --------------------------------------------------------------------------- + background: Rectangle { border { color: textField.error.length > 0 @@ -60,6 +64,18 @@ Controls.TextField { rightPadding: TextFieldStyle.text.rightPadding + toolsContainer.width selectByMouse: true + // --------------------------------------------------------------------------- + + onEditingFinished: cursorPosition = 0 + + onTextChanged: { + if (!focus) { + cursorPosition = 0 + } + } + + // --------------------------------------------------------------------------- + Icon { id: icon