diff --git a/telegram/app/qml/AccountSendMessage.qml b/telegram/app/qml/AccountSendMessage.qml index 34f8afe8..48b715a6 100644 --- a/telegram/app/qml/AccountSendMessage.qml +++ b/telegram/app/qml/AccountSendMessage.qml @@ -31,6 +31,9 @@ Rectangle { txt.focus = false; if (privates.emojiItem) privates.emojiItem.destroy(); + if (privates.attachmentItem && + privates.attachmentItem.isShown) + privates.attachmentItem.isShown = false; } function checkForSharedContent() { @@ -299,6 +302,7 @@ Rectangle { if (!telegramObject.connected || !Connectivity.online) return if (!privates.emojiItem) { + smsg.focusOut(); privates.emojiItem = emoticons_component.createObject(send_msg) privates.emojiItem.y = -privates.emojiItem.height } else { @@ -340,7 +344,9 @@ Rectangle { Haptics.play() if (!privates.attachmentItem) { - privates.attachmentItem = attach_panel_component.createObject(smsg) + var txtWasFocused = txt.focus; + smsg.focusOut(); + privates.attachmentItem = attach_panel_component.createObject(smsg, { isShown: txtWasFocused }) } privates.attachmentItem.isShown = true; } diff --git a/telegram/app/qml/components/AttachPanel.qml b/telegram/app/qml/components/AttachPanel.qml index 6ee54952..0b3bd535 100644 --- a/telegram/app/qml/components/AttachPanel.qml +++ b/telegram/app/qml/components/AttachPanel.qml @@ -59,6 +59,10 @@ Item { Rectangle { anchors.fill: parent color: "#aaffffff" + + MouseArea { + anchors.fill: parent + } } InverseMouseArea {