on xenial help sign in
Fix keyboard nav issues
8aaabf6Josh Arenson
qml/Greeter/Greeter.qml−2
@@ -212,7 +212,6 @@ Showable {
212 }
212 }
213
213
214 function login() {
214 function login() {
215− console.log("JOSH-> Entering Greeter::login()")
216 d.waiting = true;
215 d.waiting = true;
217 if (LightDMService.greeter.startSessionSync(root.sessionToStart())) {
216 if (LightDMService.greeter.startSessionSync(root.sessionToStart())) {
218 sessionStarted();
217 sessionStarted();
@@ -365,7 +364,6 @@ Showable {
365 d.selectUser(index, true);
364 d.selectUser(index, true);
366 }
365 }
367 onResponded: {
366 onResponded: {
368− console.log("JOSH-> Greeter:onResponded handler called ->" + root.locked)
369 if (root.locked) {
367 if (root.locked) {
370 LightDMService.greeter.respond(response);
368 LightDMService.greeter.respond(response);
371 } else {
369 } else {
qml/Greeter/GreeterPrompt.qml+19−2
@@ -70,19 +70,36 @@ FocusScope {
70 }
70 }
71 }
71 }
72
72
73− AbstractButton {
73+ Rectangle {
74 id: promptButton
74 id: promptButton
75 objectName: "promptButton"
75 objectName: "promptButton"
76 anchors.fill: parent
76 anchors.fill: parent
77 visible: !root.isPrompt
77 visible: !root.isPrompt
78
78
79− onClicked: {
79+ function triggered() {
80 if (d.enabled) {
80 if (d.enabled) {
81 d.enabled = false;
81 d.enabled = false;
82 root.clicked();
82 root.clicked();
83 }
83 }
84 }
84 }
85
85
86+ Rectangle {
87+ height: parent.height;
88+ width: parent.width
89+ color: "transparent"
90+ border {
91+ color: "grey"
92+ width: units.dp(1)
93+ }
94+ }
95+
96+ Keys.onReturnPressed: triggered();
97+ Keys.onEnterPressed: triggered();
98+ MouseArea {
99+ anchors.fill: parent
100+ onClicked: parent.triggered();
101+ }
102+
86 Label {
103 Label {
87 anchors.centerIn: parent
104 anchors.centerIn: parent
88 color: d.textColor
105 color: d.textColor
qml/Greeter/LoginList.qml+2−4
@@ -88,7 +88,6 @@ StyledItem {
88 id: d
88 id: d
89
89
90 function checkIfPromptless() {
90 function checkIfPromptless() {
91− console.log("JOSH-> Entering LoginList:checkIfPromptless(): " + waiting + " : " + wasPrompted);
92 if (!waiting && !wasPrompted) {
91 if (!waiting && !wasPrompted) {
93 passwordInput.isPrompt = false;
92 passwordInput.isPrompt = false;
94 passwordInput.text = root.locked ? i18n.tr("Retry")
93 passwordInput.text = root.locked ? i18n.tr("Retry")
@@ -104,7 +103,6 @@ StyledItem {
104 name: "Ubuntu.Components.Themes.Ambiance"
103 name: "Ubuntu.Components.Themes.Ambiance"
105 }
104 }
106
105
107− KeyNavigation.tab: sessionChooser
108 Keys.onUpPressed: {
106 Keys.onUpPressed: {
109 selected(currentIndex - 1);
107 selected(currentIndex - 1);
110 event.accepted = true;
108 event.accepted = true;
@@ -162,7 +160,6 @@ StyledItem {
162 moveTimer.start();
160 moveTimer.start();
163 }
161 }
164
162
165− onCurrentItemChanged: console.log("JOSH-> LoginList currentItem.height = " + currentItem.height);
166 delegate: Item {
163 delegate: Item {
167 width: parent.width
164 width: parent.width
168 height: root.cellHeight
165 height: root.cellHeight
@@ -247,6 +244,7 @@ StyledItem {
247 height: units.gu(3.5)
244 height: units.gu(3.5)
248 width: units.gu(3.5)
245 width: units.gu(3.5)
249
246
247+ activeFocusOnTab: true
250 anchors {
248 anchors {
251 right: highlightItem.right
249 right: highlightItem.right
252 rightMargin: units.gu(2)
250 rightMargin: units.gu(2)
@@ -275,7 +273,6 @@ StyledItem {
275 source: LightDMService.sessions.iconUrl(root.currentSession)
273 source: LightDMService.sessions.iconUrl(root.currentSession)
276 }
274 }
277
275
278− KeyNavigation.tab: passwordInput
279 Keys.onReturnPressed: {
276 Keys.onReturnPressed: {
280 sessionChooserButtonClicked();
277 sessionChooserButtonClicked();
281 event.accepted = true;
278 event.accepted = true;
@@ -329,6 +326,7 @@ StyledItem {
329 width: highlightItem.width - anchors.margins * 2
326 width: highlightItem.width - anchors.margins * 2
330 opacity: userList.movingInternally ? 0 : 1
327 opacity: userList.movingInternally ? 0 : 1
331
328
329+ activeFocusOnTab: true
332 isAlphanumeric: root.alphanumeric
330 isAlphanumeric: root.alphanumeric
333
331
334 onClicked: root.tryToUnlock()
332 onClicked: root.tryToUnlock()