summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2014-08-07 14:12:13 +0200
committerJ-P Nurmi <jpnurmi@digia.com>2014-09-08 13:52:48 +0200
commitff7a45a99a9e120b0ee426fcf17ac189f057823f (patch)
treea11fa99d54da12ea673b9356dd4ccf5e549fc5f2
parentcdd13a4ca9685da5f9ab7c792d90ff0b2d788a86 (diff)
TextHandle: only commit IM upon starting a drag
As an optimization, only commit current IM composing when the handle drag starts. While dragging, there should be no ongoing IM anyway. Change-Id: Ibc57a708652ce853426e42961ad9bb258d37ff3d Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
-rw-r--r--src/controls/Private/TextHandle.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/controls/Private/TextHandle.qml b/src/controls/Private/TextHandle.qml
index 85666ea41..993f621d1 100644
--- a/src/controls/Private/TextHandle.qml
+++ b/src/controls/Private/TextHandle.qml
@@ -79,6 +79,7 @@ Loader {
property real pressX
property point offset
onPressed: {
+ Qt.inputMethod.commit()
pressX = mouse.x
var handleRect = editor.positionToRectangle(handle.position)
var centerX = handleRect.x + (handleRect.width / 2)
@@ -92,7 +93,6 @@ Loader {
preventStealing = true
}
onPositionChanged: {
- Qt.inputMethod.commit()
var pt = mapToItem(editor, mouse.x - offset.x, mouse.y - offset.y)
// limit vertically within mix/max coordinates or content bounds