diff --git a/TODO.md b/TODO.md index a34bc593..95fe9cf9 100644 --- a/TODO.md +++ b/TODO.md @@ -12,7 +12,6 @@ - Replying to one of our own message that's currently only a local echo results in a reply to an empty ID -- Need to unregister popups/menus when they are destroyed without being closed - Bottom focus line for an `HTextArea` inside a `ScrollView` is invisible, put the background on `ScrollView` instead? diff --git a/src/gui/Base/HMenu.qml b/src/gui/Base/HMenu.qml index f4d0d15e..c45cf4b7 100644 --- a/src/gui/Base/HMenu.qml +++ b/src/gui/Base/HMenu.qml @@ -41,6 +41,7 @@ Menu { delete window.visibleMenus[uuid] window.visibleMenusChanged() } + Component.onDestruction: closed() property var previouslyFocused: null diff --git a/src/gui/Base/HPopup.qml b/src/gui/Base/HPopup.qml index 711eced4..855a1a48 100644 --- a/src/gui/Base/HPopup.qml +++ b/src/gui/Base/HPopup.qml @@ -43,6 +43,7 @@ Popup { delete window.visiblePopups[uuid] window.visibleMenusChanged() } + Component.onDestruction: closed() property var previouslyFocused: null