fix scroll issue

This commit is contained in:
Will McGugan
2023-04-06 10:29:50 +01:00
parent a7c0a792cf
commit eadd487584
4 changed files with 166 additions and 1 deletions

View File

@@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Allowed border_title and border_subtitle to accept Text objects
- Added additional line around titles
### Fixed
- Fixed issue which prevent scroll_visible from working https://github.com/Textualize/textual/issues/2181
## [0.18.0] - 2023-04-04
### Added

View File

@@ -2238,7 +2238,7 @@ class Widget(DOMNode):
parent = self.parent
if isinstance(parent, Widget):
self.call_after_refresh(
parent.scroll_to_widget,
self.screen.scroll_to_widget,
self,
animate=animate,
speed=speed,

File diff suppressed because one or more lines are too long

View File

@@ -386,3 +386,8 @@ def test_modal_dialog_bindings(snap_compare):
def test_dock_scroll(snap_compare):
# https://github.com/Textualize/textual/issues/2188
assert snap_compare(SNAPSHOT_APPS_DIR / "dock_scroll.py", terminal_size=(80, 25))
def test_scroll_visible(snap_compare):
# https://github.com/Textualize/textual/issues/2181
assert snap_compare(SNAPSHOT_APPS_DIR / "scroll_visible.py", press=["t"])