fix tastiera che sparisce in ricerca: remove incrementale al posto di clear() (il reset ricreava l'header col campo, perdendo il focus)

This commit is contained in:
2026-09-02 23:52:46 +02:00
parent f5ed264d3e
commit 176a1ede73
+5 -1
View File
@@ -117,7 +117,11 @@ Page {
function updateList(q) {
q = norm(q.trim())
resultModel.clear()
// Rimozione SENZA clear(): clear() resetta il modello e su questo kit
// ricrea l'header della lista (dove sta il SearchField) facendo
// perdere il focus -> tastiera che si chiude a ogni lettera.
if (resultModel.count > 0)
resultModel.remove(0, resultModel.count)
if (q === "") {
hintMsg = qsTr("Type to search among all Italian towns and known ports.")
return