mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
fd31dfe40d
commit
97e6494eee
1 changed files with 3 additions and 0 deletions
|
@ -418,6 +418,9 @@ Kirigami.ScrollablePage {
|
|||
onVisibleChanged: {
|
||||
// reset the filter when it gets toggled
|
||||
text = ""
|
||||
if (visible) {
|
||||
forceActiveFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
Controls.Label {
|
||||
|
|
Loading…
Add table
Reference in a new issue