Allow performing shortcuts while the completion menu is open
This prevents doing actions like zooming in your screen (Meta+Equals) because it will tripper shortcutOverride and close the menu. Instead, we shouldn't block shortcuts but still allow closing when Escape is pressed. This *does* block all NeoChat shortcuts when the completion menu is open, but personally I think this is fine. If you have this open, you really should finish your message first!
This commit is contained in:
@@ -310,12 +310,12 @@ QQC2.Control {
|
||||
if (quickFormatBar.visible && selectedText.length > 0) {
|
||||
quickFormatBar.close();
|
||||
}
|
||||
} else if (event.key === Qt.Key_Escape && completionMenu.visible) {
|
||||
completionMenu.close();
|
||||
}
|
||||
}
|
||||
Keys.onShortcutOverride: event => {
|
||||
if (completionMenu.visible) {
|
||||
completionMenu.close();
|
||||
} else if ((_private.chatBarCache.isReplying || _private.chatBarCache.attachmentPath.length > 0) && event.key === Qt.Key_Escape) {
|
||||
if ((_private.chatBarCache.isReplying || _private.chatBarCache.attachmentPath.length > 0) && event.key === Qt.Key_Escape) {
|
||||
_private.chatBarCache.attachmentPath = "";
|
||||
_private.chatBarCache.replyId = "";
|
||||
_private.chatBarCache.threadId = "";
|
||||
|
||||
Reference in New Issue
Block a user