diff --git a/src/gui/Base/HMenu.qml b/src/gui/Base/HMenu.qml index 89623445..69ab67bc 100644 --- a/src/gui/Base/HMenu.qml +++ b/src/gui/Base/HMenu.qml @@ -8,6 +8,7 @@ import CppUtils 0.1 Menu { id: menu + property bool isSubMenu: false property var previouslyFocused: null // MenuItems that open popups (or other elements taking focus when opened) @@ -57,6 +58,7 @@ Menu { } onAboutToShow: { + if (isSubMenu) return previouslyFocused = window.activeFocusItem focusOnClosed = Qt.binding(() => previouslyFocused) } diff --git a/src/gui/MainPane/RoomDelegate.qml b/src/gui/MainPane/RoomDelegate.qml index 6c97649d..7336c56b 100644 --- a/src/gui/MainPane/RoomDelegate.qml +++ b/src/gui/MainPane/RoomDelegate.qml @@ -149,6 +149,7 @@ HTile { HMenu { title: qsTr("Notifications") + isSubMenu: true HMenuItem { text: qsTr("Use default account settings")