Commit f6f32adf authored by Ronan's avatar Ronan
Browse files

feat(ui/modules/Common/Form/Fields/TextField): set cursor position to 0 at end edition

parent c65a5b5f
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment