From 1da42133d5e774232a0d6ce826878151f350f779 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Wed, 9 Nov 2016 16:37:36 +0100 Subject: [PATCH] feat(Chat): deselect user selection if a click is detected outside message --- tests/ui/modules/Linphone/Chat/Chat.qml | 3 ++- tests/ui/modules/Linphone/Chat/Message.qml | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/ui/modules/Linphone/Chat/Chat.qml b/tests/ui/modules/Linphone/Chat/Chat.qml index e1d82d18c..01efbd08a 100644 --- a/tests/ui/modules/Linphone/Chat/Chat.qml +++ b/tests/ui/modules/Linphone/Chat/Chat.qml @@ -11,6 +11,8 @@ import Linphone.Styles 1.0 ColumnLayout { property var contact + // ----------------------------------------------------------------- + spacing: 0 ScrollableListView { @@ -156,7 +158,6 @@ ColumnLayout { : event } } - } } diff --git a/tests/ui/modules/Linphone/Chat/Message.qml b/tests/ui/modules/Linphone/Chat/Message.qml index cf0a584b4..8304724ca 100644 --- a/tests/ui/modules/Linphone/Chat/Message.qml +++ b/tests/ui/modules/Linphone/Chat/Message.qml @@ -1,5 +1,6 @@ import QtQuick 2.7 +import Common 1.0 import Linphone.Styles 1.0 import Utils 1.0 @@ -59,6 +60,16 @@ Item { ? Qt.PointingHandCursor : Qt.ArrowCursor } + + InvertedMouseArea { + anchors.fill: parent + enabled: parent.activeFocus + + onPressed: { + parent.deselect() + parent.focus = false + } + } } Item {