mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
fix(ui/modules/Common/Form/ListForm): remove "magic code"
This commit is contained in:
parent
1ea9cb6796
commit
241049e93b
1 changed files with 3 additions and 11 deletions
|
|
@ -173,19 +173,11 @@ RowLayout {
|
|||
width: parent.width
|
||||
|
||||
onEditingFinished: _handleEditionFinished(index, text)
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if ($value.length === 0) {
|
||||
// Magic code. If it's the first inserted value,
|
||||
// an event or a callback steal the item focus.
|
||||
// I suppose it's an internal Qt qml event...
|
||||
//
|
||||
// So, I choose to run a callback executed after this
|
||||
// internal event.
|
||||
Utils.setTimeout(listForm, 0, function () {
|
||||
Component.onCompleted: {
|
||||
if ($value.length === 0) {
|
||||
textInput.forceActiveFocus()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue