From 833e39eb7d650c249bf0e3810bea4a0e55e52a57 Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Wed, 17 Jul 2024 22:51:34 +0100 Subject: [PATCH] Fix styles not updating when a widget is blurred --- src/textual/screen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/textual/screen.py b/src/textual/screen.py index cf233fbc8a..28168173ef 100644 --- a/src/textual/screen.py +++ b/src/textual/screen.py @@ -705,8 +705,8 @@ def set_focus(self, widget: Widget | None, scroll_visible: bool = True) -> None: # No focus, so blur currently focused widget if it exists if self.focused is not None: self.focused.post_message(events.Blur()) - self.focused = None blurred = self.focused + self.focused = None self.log.debug("focus was removed") elif widget.focusable: if self.focused != widget: