From 5e2d13cf09a383b260cbd581cf69a13150ba1e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Tue, 25 Nov 2014 23:41:31 +0100 Subject: [PATCH] Fix password focus in lockscreen When navigating the listview with the keyboard, the focus of the password field can get lost as it moves to the button. This patch reclaims the focus whenever the password field becomes visible. REVIEW:121253 --- lookandfeel/contents/lockscreen/LockScreen.qml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lookandfeel/contents/lockscreen/LockScreen.qml b/lookandfeel/contents/lockscreen/LockScreen.qml index 8a495ea20..ca9beb22f 100644 --- a/lookandfeel/contents/lockscreen/LockScreen.qml +++ b/lookandfeel/contents/lockscreen/LockScreen.qml @@ -134,6 +134,11 @@ Image { onAccepted: unlockFunction() focus: true visible: block.mainItem.model.get(block.mainItem.selectedIndex)["showPassword"] + onVisibleChanged: { + if (visible) { + forceActiveFocus(); + } + } Keys.onLeftPressed: { if (text == "") {