From 33a470f56965bed37104fb2e609bf32ca3948610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Gir=C3=A3o=20Serr=C3=A3o?= <5621605+rodrigogiraoserrao@users.noreply.github.com> Date: Mon, 22 May 2023 11:45:40 +0100 Subject: [PATCH] Fix footer highlight when pushing modal. --- CHANGELOG.md | 1 + src/textual/widgets/_footer.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ba7ec153..d838c46f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Changed - `Placeholder` now sets its color cycle per app https://github.com/Textualize/textual/issues/2590 +- Footer now clears key highlight regardless of whether it's in the active screen or not https://github.com/Textualize/textual/issues/2606 ### Removed diff --git a/src/textual/widgets/_footer.py b/src/textual/widgets/_footer.py index a52e05785..b5e772ab6 100644 --- a/src/textual/widgets/_footer.py +++ b/src/textual/widgets/_footer.py @@ -79,8 +79,7 @@ class Footer(Widget): def _on_leave(self, _: events.Leave) -> None: """Clear any highlight when the mouse leaves the widget""" - if self.screen.is_current: - self.highlight_key = None + self.highlight_key = None def __rich_repr__(self) -> rich.repr.Result: yield from super().__rich_repr__()