From 7d4fdf48a52b0b0e80a3d7cab4336c860307f15e Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Fri, 8 Mar 2024 17:34:10 -0500 Subject: [PATCH] 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 --- initialstart/modules/time/package/contents/ui/main.qml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/initialstart/modules/time/package/contents/ui/main.qml b/initialstart/modules/time/package/contents/ui/main.qml index d44d68fc..aee086cb 100644 --- a/initialstart/modules/time/package/contents/ui/main.qml +++ b/initialstart/modules/time/package/contents/ui/main.qml @@ -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() } } }