Skip to content

Commit c1c94cc

Browse files
authored
Merge pull request #6008 from Textualize/bump510
Bump510
2 parents 20b855a + 0634101 commit c1c94cc

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
- Added `empty` pseudo class, which applies when a widget has no displayed children https://github.com/Textualize/textual/pull/5999
1313
- Added `Screen.action_focus` https://github.com/Textualize/textual/pull/5999
14+
- Added support for left and right mouse scroll for terminals and input devices which support it https://github.com/Textualize/textual/pull/5995
1415

1516
### Changed
1617

docs/guide/CSS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ Here are some other pseudo classes:
342342
- `:blur` Matches widgets which *do not* have input focus.
343343
- `:dark` Matches widgets in dark themes (where `App.theme.dark == True`).
344344
- `:disabled` Matches widgets which are in a disabled state.
345+
- `:empty` Matches widgets which have no displayed children.
345346
- `:enabled` Matches widgets which are in an enabled state.
346347
- `:even` Matches a widget at an evenly numbered position within its siblings.
347348
- `:first-child` Matches a widget that is the first amongst its siblings.

src/textual/widget.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4592,14 +4592,12 @@ def _on_mouse_scroll_up(self, event: events.MouseScrollUp) -> None:
45924592

45934593
def _on_mouse_scroll_right(self, event: events.MouseScrollRight) -> None:
45944594
if self.allow_horizontal_scroll:
4595-
self.release_anchor()
4596-
if self._scroll_right_for_pointer(animate=False):
4595+
if self._scroll_right_for_pointer():
45974596
event.stop()
45984597

45994598
def _on_mouse_scroll_left(self, event: events.MouseScrollLeft) -> None:
46004599
if self.allow_horizontal_scroll:
4601-
self.release_anchor()
4602-
if self._scroll_left_for_pointer(animate=False):
4600+
if self._scroll_left_for_pointer():
46034601
event.stop()
46044602

46054603
def _on_scroll_to(self, message: ScrollTo) -> None:

tests/footer/test_footer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ def action_app_binding(self) -> None:
5454
assert app_binding_count == 0
5555
await app.wait_for_refresh()
5656
await pilot.click("Footer", offset=(1, 0))
57+
await app.wait_for_refresh()
5758
assert app_binding_count == 1
5859
await pilot.click("Footer")
60+
await app.wait_for_refresh()
5961
assert app_binding_count == 2

0 commit comments

Comments
 (0)