diff options
author | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2014-10-27 11:13:36 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2014-10-27 16:09:45 +0100 |
commit | 38b908abbe8acbcb8ccff1f1e6cc2781b182a1f3 (patch) | |
tree | b6b5dfd28f3d0588be84a44507ad906d7a6c34c3 /src/controls/TextArea.qml | |
parent | 19a1de32e68389147566ab7d51df47946511d847 (diff) | |
download | qtquickcontrols-38b908abbe8acbcb8ccff1f1e6cc2781b182a1f3.tar.gz |
TextInput: disable activation logic when there is a menu assigned
The edit menu has it's own logic for when to show the menu, when
to activate the input field etc upon press/release/click. So if
there is a menu, don't interfere with its logic.
Change-Id: If6af1e7b8f6bc68c66836846969cfe6bcee56de4
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/controls/TextArea.qml')
-rw-r--r-- | src/controls/TextArea.qml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml index 844cbff1..873417dc 100644 --- a/src/controls/TextArea.qml +++ b/src/controls/TextArea.qml @@ -851,11 +851,15 @@ ScrollView { cursorShape: edit.hoveredLink ? Qt.PointingHandCursor : Qt.IBeamCursor acceptedButtons: (edit.selectByMouse ? Qt.NoButton : Qt.LeftButton) | (area.menu ? Qt.RightButton : Qt.NoButton) onClicked: { + if (editMenu.source) + return; var pos = edit.positionAt(mouse.x, mouse.y) edit.moveHandles(pos, pos) edit.activate() } onPressAndHold: { + if (editMenu.source) + return; var pos = edit.positionAt(mouse.x, mouse.y) edit.moveHandles(pos, area.selectByMouse ? -1 : pos) edit.activate() |