← Back to team overview

ubuntu-sdk-team team mailing list archive

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

 

Adnane Belmadiaf has proposed merging lp:~daker/ubuntu-ui-toolkit/fix.1630872 into lp:ubuntu-ui-toolkit/staging.

Requested reviews:
  Ubuntu SDK team (ubuntu-sdk-team)
Related bugs:
  Bug #1630872 in ubuntu-ui-toolkit (Ubuntu): "Clear text (x) does not clear the first suggested but not committed word"
  https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1630872

For more details, see:
https://code.launchpad.net/~daker/ubuntu-ui-toolkit/fix.1630872/+merge/317806
-- 
Your team Ubuntu SDK team is requested to review the proposed merge of lp:~daker/ubuntu-ui-toolkit/fix.1630872 into lp:ubuntu-ui-toolkit/staging.
=== modified file 'src/imports/Components/1.3/TextField.qml'
--- src/imports/Components/1.3/TextField.qml	2017-01-18 13:00:07 +0000
+++ src/imports/Components/1.3/TextField.qml	2017-02-21 00:13:20 +0000
@@ -988,7 +988,12 @@
             name: control.hasClearButton && !control.readOnly ? "edit-clear" : ""
         }
 
-        onClicked: editor.text = ""
+        onClicked: {
+            //FIXME: Invoke editor.clear() once the SDK moves to Qt 5.7
+            // http://doc.qt.io/qt-5/qml-qtquick-textinput.html#clear-method
+            editor.text = ""
+            Qt.inputMethod.reset();
+        }
     }
 
     // hint text


Follow ups