diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2018-10-19 06:54:34 -0400 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-23 22:45:30 +0100 |
commit | 97e6494eeeca750667332e1279f5d4cfa1b99f80 (patch) | |
tree | 434ba50302edee636be403d7fdf7fd3aa46fcffe /mobile-widgets/qml | |
parent | fd31dfe40d1e0a2e0352b16fbc72d3d529905eb6 (diff) | |
download | subsurface-97e6494eeeca750667332e1279f5d4cfa1b99f80.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r-- | mobile-widgets/qml/DiveList.qml | 3 |
1 files changed, 3 insertions, 0 deletions
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 { |