Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scroll page #4916

Merged
merged 5 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- Fix crash when `validate_on` value isn't a set https://github.com/Textualize/textual/pull/4868
- Fix `Input.cursor_blink` having no effect on the blink cycle after mounting https://github.com/Textualize/textual/pull/4869
- Fixed scrolling by page not taking scrollbar in to account https://github.com/Textualize/textual/pull/4916

## [0.76.0]

Expand Down
8 changes: 4 additions & 4 deletions src/textual/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -2647,7 +2647,7 @@ def scroll_page_up(
level: Minimum level required for the animation to take place (inclusive).
"""
self.scroll_to(
y=self.scroll_y - self.container_size.height,
y=self.scroll_y - self.scrollable_content_region.height,
animate=animate,
speed=speed,
duration=duration,
Expand Down Expand Up @@ -2680,7 +2680,7 @@ def scroll_page_down(
level: Minimum level required for the animation to take place (inclusive).
"""
self.scroll_to(
y=self.scroll_y + self.container_size.height,
y=self.scroll_y + self.scrollable_content_region.height,
animate=animate,
speed=speed,
duration=duration,
Expand Down Expand Up @@ -2715,7 +2715,7 @@ def scroll_page_left(
if speed is None and duration is None:
duration = 0.3
self.scroll_to(
x=self.scroll_x - self.container_size.width,
x=self.scroll_x - self.scrollable_content_region.width,
animate=animate,
speed=speed,
duration=duration,
Expand Down Expand Up @@ -2750,7 +2750,7 @@ def scroll_page_right(
if speed is None and duration is None:
duration = 0.3
self.scroll_to(
x=self.scroll_x + self.container_size.width,
x=self.scroll_x + self.scrollable_content_region.width,
animate=animate,
speed=speed,
duration=duration,
Expand Down
Loading
Loading