diff options
author | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2014-07-28 15:12:45 +0300 |
---|---|---|
committer | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2014-08-14 09:40:45 +0300 |
commit | 7a7ddb56dee32cc7acf284abed3bfbd1cbb5c99b (patch) | |
tree | f3068ffee784c3c66b4b4ee422b0e78744dc2ff6 /examples | |
parent | e2caa8383efa28cbaca5d1d567c95895ad6d5799 (diff) |
Do not commit the active word if reopening the keyboard
Previously the example application commits the active word every
time a text field is touched. Now it commits the active word only
if the keyboard is already visible.
Task-number: QTRD-3061
Change-Id: Ice0780ed67cffe028fa64ccfb79bbac5f1dd9f55
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/quick/enterprise/virtualkeyboard/virtualkeyboard/content/TextBase.qml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/quick/enterprise/virtualkeyboard/virtualkeyboard/content/TextBase.qml b/examples/quick/enterprise/virtualkeyboard/virtualkeyboard/content/TextBase.qml index 9dc35742..c6ebc6d1 100644 --- a/examples/quick/enterprise/virtualkeyboard/virtualkeyboard/content/TextBase.qml +++ b/examples/quick/enterprise/virtualkeyboard/virtualkeyboard/content/TextBase.qml @@ -65,8 +65,13 @@ FocusScope { parent: textBase anchors.fill: parent onClicked: { - if (editor.inputMethodComposing) + if (editor.inputMethodComposing) { + if (!Qt.inputMethod.visible) { + Qt.inputMethod.show() + return + } Qt.inputMethod.commit() + } var positionInEditor = mapToItem(editor, mouseX, mouseY) var cursorPosition = editor.positionAt(positionInEditor.x, positionInEditor.y) editor.cursorPosition = cursorPosition |