From 97e6494eeeca750667332e1279f5d4cfa1b99f80 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 19 Oct 2018 06:54:34 -0400 Subject: Mobile/filtering: ensure filter input field has focus when shown QML's logic for who gets focus is a bit complicated. But forceActiveFocus() cuts through the confusion and makes sure that your field does indeed get focus. Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DiveList.qml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mobile-widgets/qml/DiveList.qml') diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index 33668616b..ea9c8f590 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -418,6 +418,9 @@ Kirigami.ScrollablePage { onVisibleChanged: { // reset the filter when it gets toggled text = "" + if (visible) { + forceActiveFocus() + } } } Controls.Label { -- cgit v1.2.3-70-g09d2