From 2235d5cb620f31951d6681aafb3f7a34dac8c436 Mon Sep 17 00:00:00 2001 From: dijunkun Date: Tue, 22 Sep 2026 10:39:27 +0800 Subject: [PATCH] [fix] place the cursor at the end of the password on retry --- apps/desktop/src/gui/ui/main_window.slint | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/gui/ui/main_window.slint b/apps/desktop/src/gui/ui/main_window.slint index a8864f87..44408844 100644 --- a/apps/desktop/src/gui/ui/main_window.slint +++ b/apps/desktop/src/gui/ui/main_window.slint @@ -1325,7 +1325,14 @@ export component MainWindow inherits Window { Timer { interval: 1ms; running: true; - triggered => { connection-password-editor.focus(); } + triggered => { + self.running = false; + connection-password-editor.focus(); + // Collapse the selection at the end of the restored + // password, including text with multi-byte characters. + connection-password-editor.select-all(); + connection-password-editor.clear-selection(); + } } }