diff --git a/src/braindrop/app/screens/main.py b/src/braindrop/app/screens/main.py index d0d495b..d629391 100644 --- a/src/braindrop/app/screens/main.py +++ b/src/braindrop/app/screens/main.py @@ -439,10 +439,7 @@ def action_details_command(self) -> None: if ( hidden := self.has_class("details-hidden") and self.focused is not None - and ( - self.focused is self.query_one(RaindropDetails) - or self.focused.parent is self.query_one(RaindropDetails) - ) + and self.query_one(RaindropDetails) in (self.focused, self.focused.parent) ): # Focus was on the details, or within, so let's ensure it heads # back to the list of raindrops as that feels like the most