From 130533dd1e04c7b3bbccd44903089d9f8103ee2b Mon Sep 17 00:00:00 2001 From: Attacktive Date: Thu, 7 Jul 2022 01:40:50 +0900 Subject: [PATCH] Fix wrong initial focus https://github.com/Swordfish90/cool-retro-term/issues/733 --- app/qml/InsertNameDialog.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/qml/InsertNameDialog.qml b/app/qml/InsertNameDialog.qml index fb4d7e97..9a55cd50 100644 --- a/app/qml/InsertNameDialog.qml +++ b/app/qml/InsertNameDialog.qml @@ -82,11 +82,15 @@ Window { nameSelected(name) close() } + namefield.forceActiveFocus() } } Button { text: qsTr("Cancel") - onClicked: close() + onClicked: function() { + namefield.forceActiveFocus() + close() + } } } }