From 088887c80210f35d1b5c5e1719b76274e87346d9 Mon Sep 17 00:00:00 2001 From: lebedeviv1988 Date: Thu, 5 Mar 2026 11:01:14 +0000 Subject: [PATCH] fix: enables the send message shortcut only for active chat (#322) fix: Disables sending message shortcut instead of filtering in `Shortcut::activated` signal handler Co-authored-by: Ivan Lebedev --- ChatView/qml/RootItem.qml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ChatView/qml/RootItem.qml b/ChatView/qml/RootItem.qml index b90d049..548a86c 100644 --- a/ChatView/qml/RootItem.qml +++ b/ChatView/qml/RootItem.qml @@ -514,11 +514,8 @@ ChatRootView { sequences: ["Ctrl+Return", "Ctrl+Enter"] context: Qt.WindowShortcut - onActivated: { - if (messageInput.activeFocus && !Qt.inputMethod.visible && !fileMentionPopup.visible) { - root.sendChatMessage() - } - } + enabled: messageInput.activeFocus && !Qt.inputMethod.visible && !fileMentionPopup.visible + onActivated: root.sendChatMessage() } function clearChat() {