diff --git a/src/gui/Base/HTextArea.qml b/src/gui/Base/HTextArea.qml index 9bc77cf2..6ac93cb0 100644 --- a/src/gui/Base/HTextArea.qml +++ b/src/gui/Base/HTextArea.qml @@ -16,6 +16,7 @@ TextArea { property bool bordered: true property var focusItemOnTab: null + property bool menuKeySpawnsMenu: true property var disabledText: null property var defaultText: null // XXX test me readonly property bool changed: text !== (defaultText || "") @@ -108,7 +109,7 @@ TextArea { } } - Keys.onMenuPressed: contextMenu.spawn(false) + Keys.onMenuPressed: if (menuKeySpawnsMenu) contextMenu.spawn(false) // Prevent leaking arrow presses to parent elements when the carret is at // the beginning or end of the text diff --git a/src/gui/Pages/Chat/Composer/MessageArea.qml b/src/gui/Pages/Chat/Composer/MessageArea.qml index a319455e..08fada08 100644 --- a/src/gui/Pages/Chat/Composer/MessageArea.qml +++ b/src/gui/Pages/Chat/Composer/MessageArea.qml @@ -95,6 +95,8 @@ HTextArea { disabledText: qsTr("You do not have permission to post in this room") placeholderText: qsTr("Type a message...") enableCustomImagePaste: true + menuKeySpawnsMenu: + ! (eventList && (eventList.currentItem || eventList.selectedCount)) backgroundColor: "transparent" focusedBorderColor: "transparent"