Skip to content

Commit

Permalink
fix scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Apr 25, 2024
1 parent 17d4c96 commit d670426
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed

- Fixed `TextArea` to end mouse selection only if currently selecting https://github.com/Textualize/textual/pull/4436
- Fixed issue with scroll_to_widget

### Changed

Expand Down
8 changes: 6 additions & 2 deletions src/textual/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -3326,15 +3326,19 @@ def refresh(
Returns:
The `Widget` instance.
"""
if not self._is_mounted:
return self

if layout:
self._layout_required = True
for ancestor in self.ancestors:
if not isinstance(ancestor, Widget):
break
ancestor._clear_arrangement_cache()

if not self._is_mounted:
self._repaint_required = True
self.check_idle()
return self

if recompose:
self._recompose_required = True
self.call_next(self._check_recompose)
Expand Down

0 comments on commit d670426

Please sign in to comment.