Merge lp:~renatofilho/address-book-app/fix-text-field-focus into lp:address-book-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Bill Filler
Approved revision: 464
Merged at revision: 464
Proposed branch: lp:~renatofilho/address-book-app/fix-text-field-focus
Merge into: lp:address-book-app
Diff against target: 22 lines (+5/-0)
1 file modified
src/imports/Ubuntu/AddressBook/ContactEditor/TextInputDetail.qml (+5/-0)
To merge this branch: bzr merge lp:~renatofilho/address-book-app/fix-text-field-focus
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+268489@code.launchpad.net

Commit message

Fix focus path to focus only in TextFields while using OSK.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/imports/Ubuntu/AddressBook/ContactEditor/TextInputDetail.qml'
2--- src/imports/Ubuntu/AddressBook/ContactEditor/TextInputDetail.qml 2015-06-08 15:59:22 +0000
3+++ src/imports/Ubuntu/AddressBook/ContactEditor/TextInputDetail.qml 2015-08-19 14:31:27 +0000
4@@ -25,6 +25,7 @@
5 FocusScope {
6 id: root
7
8+ readonly property bool isTextField: true
9 property QtObject detail
10 property int field: -1
11 property variant originalValue: root.detail && (root.field >= 0) ? root.detail.value(root.field) : null
12@@ -94,6 +95,10 @@
13 }
14 Keys.onReturnPressed: {
15 var next = field.nextItemInFocusChain(true)
16+ // only focus on TextInputDetails
17+ while (!next || !next.hasOwnProperty("isTextField")) {
18+ next = next.nextItemInFocusChain(true)
19+ }
20 if (next) {
21 next.forceActiveFocus()
22 }

Subscribers

People subscribed via source and target branches