File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ )
66and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
77
8+ ### Unreleased
9+
10+ ### Fixed
11+
12+ - Fixed infinite loop in ` Widget.anchor ` https://github.com/Textualize/textual/pull/5290
13+
814## [ 0.87.1] - 2024-11-24
915
1016## Fixed
Original file line number Diff line number Diff line change @@ -593,7 +593,7 @@ def opacity(self) -> float:
593593 @property
594594 def is_anchored (self ) -> bool :
595595 """Is this widget anchored?"""
596- return self ._parent is not None and self ._parent is self
596+ return isinstance ( self ._parent , Widget ) and self ._parent . _anchored is self
597597
598598 @property
599599 def is_mouse_over (self ) -> bool :
@@ -4080,9 +4080,7 @@ async def _on_idle(self, event: events.Idle) -> None:
40804080 self ._check_refresh ()
40814081
40824082 if self .is_anchored :
4083- self .scroll_visible (animate = self ._anchor_animate )
4084- if self ._anchored :
4085- self ._anchored .scroll_visible (animate = self ._anchor_animate )
4083+ self .scroll_visible (animate = self ._anchor_animate , immediate = True )
40864084
40874085 def _check_refresh (self ) -> None :
40884086 """Check if a refresh was requested."""
You can’t perform that action at this time.
0 commit comments