diff --git a/modules/app_components/menu.py b/modules/app_components/menu.py index 05ccefa..b5e4216 100644 --- a/modules/app_components/menu.py +++ b/modules/app_components/menu.py @@ -62,9 +62,11 @@ def _handle_buttondown(self, event: ButtonDownEvent): self.menu_items[self.position % len(self.menu_items)] ) if BUTTON_TYPES["CANCEL"] in event.button: + self._cleanup() if self.back_handler is not None: self.back_handler() if BUTTON_TYPES["CONFIRM"] in event.button: + self._cleanup() if self.select_handler is not None: self.select_handler( self.menu_items[self.position % len(self.menu_items)],