Skip to content
Merged

Bump510 #6008

Show file tree
Hide file tree
Changes from all 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 @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

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

### Changed

Expand Down
1 change: 1 addition & 0 deletions docs/guide/CSS.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ Here are some other pseudo classes:
- `:blur` Matches widgets which *do not* have input focus.
- `:dark` Matches widgets in dark themes (where `App.theme.dark == True`).
- `:disabled` Matches widgets which are in a disabled state.
- `:empty` Matches widgets which have no displayed children.
- `:enabled` Matches widgets which are in an enabled state.
- `:even` Matches a widget at an evenly numbered position within its siblings.
- `:first-child` Matches a widget that is the first amongst its siblings.
Expand Down
6 changes: 2 additions & 4 deletions src/textual/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -4592,14 +4592,12 @@ def _on_mouse_scroll_up(self, event: events.MouseScrollUp) -> None:

def _on_mouse_scroll_right(self, event: events.MouseScrollRight) -> None:
if self.allow_horizontal_scroll:
self.release_anchor()
if self._scroll_right_for_pointer(animate=False):
if self._scroll_right_for_pointer():
event.stop()

def _on_mouse_scroll_left(self, event: events.MouseScrollLeft) -> None:
if self.allow_horizontal_scroll:
self.release_anchor()
if self._scroll_left_for_pointer(animate=False):
if self._scroll_left_for_pointer():
event.stop()

def _on_scroll_to(self, message: ScrollTo) -> None:
Expand Down
2 changes: 2 additions & 0 deletions tests/footer/test_footer.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def action_app_binding(self) -> None:
assert app_binding_count == 0
await app.wait_for_refresh()
await pilot.click("Footer", offset=(1, 0))
await app.wait_for_refresh()
assert app_binding_count == 1
await pilot.click("Footer")
await app.wait_for_refresh()
assert app_binding_count == 2
Loading