Merge lp:~daker/ubuntu-ui-toolkit/fix.1630872 into lp:ubuntu-ui-toolkit/staging

Proposed by Adnane Belmadiaf on 2017-02-21
Status: Merged
Approved by: Christian Dywan on 2017-02-21
Approved revision: 2175
Merged at revision: 2179
Proposed branch: lp:~daker/ubuntu-ui-toolkit/fix.1630872
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 17 lines (+6/-1)
1 file modified
src/imports/Components/1.3/TextField.qml (+6/-1)
To merge this branch: bzr merge lp:~daker/ubuntu-ui-toolkit/fix.1630872
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve on 2017-02-21
Christian Dywan 2017-02-21 Approve on 2017-02-21
Review via email: mp+317806@code.launchpad.net

Commit Message

Make sure we resets partial text input from the input method

Description of the Change

Clear method has been in Qt 5.7 so for now we need to reset the input method & put an empty string to clear the input field

To post a comment you must log in.
Christian Dywan (kalikiana) wrote :

Good catch, I wasn't aware of this. And good call on the FIXME. Good to go!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/imports/Components/1.3/TextField.qml'
2--- src/imports/Components/1.3/TextField.qml 2017-01-18 13:00:07 +0000
3+++ src/imports/Components/1.3/TextField.qml 2017-02-21 00:18:16 +0000
4@@ -988,7 +988,12 @@
5 name: control.hasClearButton && !control.readOnly ? "edit-clear" : ""
6 }
7
8- onClicked: editor.text = ""
9+ onClicked: {
10+ //FIXME: Invoke editor.clear() once the SDK moves to Qt 5.7
11+ // http://doc.qt.io/qt-5/qml-qtquick-textinput.html#clear-method
12+ editor.text = "";
13+ Qt.inputMethod.reset();
14+ }
15 }
16
17 // hint text

Subscribers

People subscribed via source and target branches