mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
fix scroll issue
This commit is contained in:
@@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Allowed border_title and border_subtitle to accept Text objects
|
- Allowed border_title and border_subtitle to accept Text objects
|
||||||
- Added additional line around titles
|
- 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
|
## [0.18.0] - 2023-04-04
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -2238,7 +2238,7 @@ class Widget(DOMNode):
|
|||||||
parent = self.parent
|
parent = self.parent
|
||||||
if isinstance(parent, Widget):
|
if isinstance(parent, Widget):
|
||||||
self.call_after_refresh(
|
self.call_after_refresh(
|
||||||
parent.scroll_to_widget,
|
self.screen.scroll_to_widget,
|
||||||
self,
|
self,
|
||||||
animate=animate,
|
animate=animate,
|
||||||
speed=speed,
|
speed=speed,
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -386,3 +386,8 @@ def test_modal_dialog_bindings(snap_compare):
|
|||||||
def test_dock_scroll(snap_compare):
|
def test_dock_scroll(snap_compare):
|
||||||
# https://github.com/Textualize/textual/issues/2188
|
# https://github.com/Textualize/textual/issues/2188
|
||||||
assert snap_compare(SNAPSHOT_APPS_DIR / "dock_scroll.py", terminal_size=(80, 25))
|
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"])
|
||||||
|
|||||||
Reference in New Issue
Block a user