fix(kiosk): dismiss on-screen keyboard on accept and tap-outside

The OSK opened on kiosk search/inputs but never closed: focus stayed on
the search field. Clear focus in the field's `accepted` handler and add a
full-bleed background TouchArea that clears focus on any tap outside the
input, so the on-screen keyboard dismisses.

cc
This commit is contained in:
vicrodh committed 2026-07-18 19:50:27 -06:00
1 parent a08d91eeef
commit 5ebe418805
1 file changed
+12
+12
View File
@@ -176,6 +176,10 @@ export component KioskShell inherits Rectangle {
accepted(text) => {
SearchActions.submit(text);
NavState.view = ContentView.search;
// Release focus so Slint sends text-input DISABLE → the OS
// on-screen keyboard (squeekboard) closes. Otherwise the
// search field keeps focus forever and the OSK never hides.
search-field.clear-focus();
}
}
}
@@ -193,6 +197,14 @@ export component KioskShell inherits Rectangle {
Rectangle {
vertical-stretch: 1;
background: Theme.surface-card;
// Tap anywhere in the content area to dismiss the OS on-screen
// keyboard: release the search field's focus → Slint sends the
// text-input DISABLE → squeekboard closes. Declared FIRST so it sits
// BEHIND the views (which handle their own taps); it only catches
// empty-area taps.
dismiss-osk-ta := TouchArea {
clicked => { search-field.clear-focus(); }
}
VerticalLayout {
vertical-stretch: 1;
padding-left: 8px;