Skip to content

Commit 0ec41af

Browse files
authored
add mouse down handler (#3778)
* add mouse down handler * changelog * version bump
1 parent 60766a3 commit 0ec41af

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [0.43.1] - 2023-11-29
9+
10+
### Fixed
11+
12+
- Fixed clicking on scrollbar moves TextArea cursor https://github.com/Textualize/textual/issues/3763
813

914
## [0.43.0] - 2023-11-28
1015

@@ -1460,6 +1465,7 @@ https://textual.textualize.io/blog/2022/11/08/version-040/#version-040
14601465
- New handler system for messages that doesn't require inheritance
14611466
- Improved traceback handling
14621467

1468+
[0.43.1]: https://github.com/Textualize/textual/compare/v0.43.0...v0.43.1
14631469
[0.43.0]: https://github.com/Textualize/textual/compare/v0.42.0...v0.43.0
14641470
[0.42.0]: https://github.com/Textualize/textual/compare/v0.41.0...v0.42.0
14651471
[0.41.0]: https://github.com/Textualize/textual/compare/v0.40.0...v0.41.0

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "textual"
3-
version = "0.43.0"
3+
version = "0.43.1"
44
homepage = "https://github.com/Textualize/textual"
55
repository = "https://github.com/Textualize/textual"
66
documentation = "https://textual.textualize.io/"

src/textual/scrollbar.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,10 @@ def action_grab(self) -> None:
316316
"""Begin capturing the mouse cursor."""
317317
self.capture_mouse()
318318

319+
async def _on_mouse_down(self, event: events.MouseDown) -> None:
320+
# We don't want mouse events on the scrollbar bubbling
321+
event.stop()
322+
319323
async def _on_mouse_up(self, event: events.MouseUp) -> None:
320324
if self.grabbed:
321325
self.release_mouse()

0 commit comments

Comments
 (0)