@@ -101,83 +101,89 @@ Showable {
101101 anchors.fill: root
102102 }
103103
104− Loader {
105− id: pinPadLoader
106− objectName: "pinPadLoader"
104+ FocusScope {
105+ id: loaderScope
107106 anchors.fill: parent
108− property bool resetting: false
109− property bool waiting: false
110− property bool showWrongText: false
111−
112− source: {
113− if (resetting || !root.required) {
114− return ""
115− } else if (root.delayMinutes > 0) {
116− return "DelayedLockscreen.qml"
117− } else if (root.alphaNumeric) {
118− return "PassphraseLockscreen.qml"
119− } else {
120− return "PinLockscreen.qml"
107+
108+ Loader {
109+ id: pinPadLoader
110+ objectName: "pinPadLoader"
111+ anchors.fill: parent
112+ property bool resetting: false
113+ property bool waiting: false
114+ property bool showWrongText: false
115+
116+ source: {
117+ if (resetting || !root.required) {
118+ return ""
119+ } else if (root.delayMinutes > 0) {
120+ return "DelayedLockscreen.qml"
121+ } else if (root.alphaNumeric) {
122+ return "PassphraseLockscreen.qml"
123+ } else {
124+ return "PinLockscreen.qml"
125+ }
126+ }
127+ onSourceChanged: {
128+ waiting = false
129+ showWrongText = false
130+ if (loaderScope.activeFocus)
131+ clear(false)
121132 }
122− }
123− onSourceChanged: {
124− waiting = false
125− showWrongText = false
126− clear(false)
127− }
128133
129− Connections {
130− target: pinPadLoader.item
134+ Connections {
135+ target: pinPadLoader.item
131136
132− onEntered: {
133− pinPadLoader.waiting = true
134− root.entered(passphrase);
135− }
137+ onEntered: {
138+ pinPadLoader.waiting = true
139+ root.entered(passphrase);
140+ }
136141
137− onCancel: {
138− root.cancel()
142+ onCancel: {
143+ root.cancel()
144+ }
139145 }
140− }
141146
142− Binding {
143− target: pinPadLoader.item
144− property: "minPinLength"
145− value: root.minPinLength
146− }
147− Binding {
148− target: pinPadLoader.item
149− property: "maxPinLength"
150− value: root.maxPinLength
151− }
152− Binding {
153− target: pinPadLoader.item
154− property: "infoText"
155− value: root.infoText
156− }
157− Binding {
158− target: pinPadLoader.item
159− property: "retryText"
160− value: root.retryText
161− }
162− Binding {
163− target: pinPadLoader.item
164− property: "errorText"
165− value: pinPadLoader.showWrongText ? root.errorText : ""
166− }
167− Binding {
168− target: pinPadLoader.item
169− property: "entryEnabled"
170− value: !pinPadLoader.waiting
171− }
172− Binding {
173− target: pinPadLoader.item
174− property: "alphaNumeric"
175− value: root.alphaNumeric
176− }
177− Binding {
178− target: pinPadLoader.item
179− property: "delayMinutes"
180− value: root.delayMinutes
147+ Binding {
148+ target: pinPadLoader.item
149+ property: "minPinLength"
150+ value: root.minPinLength
151+ }
152+ Binding {
153+ target: pinPadLoader.item
154+ property: "maxPinLength"
155+ value: root.maxPinLength
156+ }
157+ Binding {
158+ target: pinPadLoader.item
159+ property: "infoText"
160+ value: root.infoText
161+ }
162+ Binding {
163+ target: pinPadLoader.item
164+ property: "retryText"
165+ value: root.retryText
166+ }
167+ Binding {
168+ target: pinPadLoader.item
169+ property: "errorText"
170+ value: pinPadLoader.showWrongText ? root.errorText : ""
171+ }
172+ Binding {
173+ target: pinPadLoader.item
174+ property: "entryEnabled"
175+ value: !pinPadLoader.waiting
176+ }
177+ Binding {
178+ target: pinPadLoader.item
179+ property: "alphaNumeric"
180+ value: root.alphaNumeric
181+ }
182+ Binding {
183+ target: pinPadLoader.item
184+ property: "delayMinutes"
185+ value: root.delayMinutes
186+ }
181187 }
182188 Binding {
183189 target: pinPadLoader.item