mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
initialstart/time: Fix search box getting unfocused on every key press
Fixes https://invent.kde.org/plasma/plasma-mobile/-/issues/288 Ensure that the ListView is not taking focus from the text field
This commit is contained in:
parent
d2f63e6d9a
commit
7d4fdf48a5
1 changed files with 1 additions and 8 deletions
|
|
@ -68,6 +68,7 @@ Item {
|
|||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
model: Time.TimeUtil.timeZones
|
||||
currentIndex: -1 // ensure focus is not on the listview
|
||||
|
||||
header: Control {
|
||||
width: listView.width
|
||||
|
|
@ -81,14 +82,6 @@ Item {
|
|||
|
||||
onTextChanged: {
|
||||
Time.TimeUtil.timeZones.filterString = text;
|
||||
// HACK: search field seems to lose focus every time the text changes
|
||||
focusTimer.restart();
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: focusTimer
|
||||
interval: 1
|
||||
onTriggered: searchField.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue