diff --git a/CHANGELOG.md b/CHANGELOG.md index 671f519b4d..8d889e62ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## Unreleased +## [0.63.4] ### Added - Added `immediate` switch to `Signal.publish` +### Fixed + +- Fixed freeze in recompose from bindings https://github.com/Textualize/textual/pull/4558 + ## [0.63.3] - 2024-05-24 ### Fixed @@ -2019,6 +2023,7 @@ https://textual.textualize.io/blog/2022/11/08/version-040/#version-040 - New handler system for messages that doesn't require inheritance - Improved traceback handling +[0.63.4]: https://github.com/Textualize/textual/compare/v0.63.3...v0.63.4 [0.63.3]: https://github.com/Textualize/textual/compare/v0.63.2...v0.63.3 [0.63.2]: https://github.com/Textualize/textual/compare/v0.63.1...v0.63.2 [0.63.1]: https://github.com/Textualize/textual/compare/v0.63.0...v0.63.1 diff --git a/pyproject.toml b/pyproject.toml index f4f7302d1d..9cd24b9b78 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "textual" -version = "0.63.3" +version = "0.63.4" homepage = "https://github.com/Textualize/textual" repository = "https://github.com/Textualize/textual" documentation = "https://textual.textualize.io/" diff --git a/src/textual/widget.py b/src/textual/widget.py index 029e411905..696468b30e 100644 --- a/src/textual/widget.py +++ b/src/textual/widget.py @@ -1123,11 +1123,12 @@ async def recompose(self) -> None: Recomposing will remove children and call `self.compose` again to remount. """ - if self._parent is not None: - async with self.batch(): - await self.query("*").exclude(".-textual-system").remove() - if self.is_attached: - await self.mount_all(compose(self)) + if not self.is_attached: + return + async with self.batch(): + await self.query("*").exclude(".-textual-system").remove() + if self.is_attached: + await self.mount_all(compose(self)) def _post_register(self, app: App) -> None: """Called when the instance is registered. diff --git a/src/textual/widgets/_footer.py b/src/textual/widgets/_footer.py index 3dffdb33b6..811ef2b76f 100644 --- a/src/textual/widgets/_footer.py +++ b/src/textual/widgets/_footer.py @@ -162,7 +162,7 @@ def compose(self) -> ComposeResult: def on_mount(self) -> None: async def bindings_changed(screen: Screen) -> None: - if screen is self.screen: + if self.is_attached and screen is self.screen: await self.recompose() self.screen.bindings_updated_signal.subscribe(self, bindings_changed)