Skip to content

Commit d50b353

Browse files
authored
Merge pull request #5770 from TomJGooding/fix-button-prevent-text-selection
fix(button): prevent text selection
2 parents 2f38af7 + 9837bd4 commit d50b353

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ 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-
## [Unreleased]
8+
9+
## Unreleased
910

1011
### Fixed
1112

1213
- Fixed `VERTICAL_BREAKPOINTS` doesn't work https://github.com/Textualize/textual/pull/5785
14+
- Fixed `Button` allowing text selection https://github.com/Textualize/textual/pull/5770
1315

1416
## [3.2.0] - 2025-05-02
1517

src/textual/widgets/_button.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ class Button(Widget, can_focus=True):
4444
4545
"""
4646

47+
ALLOW_SELECT = False
48+
4749
DEFAULT_CSS = """
4850
Button {
4951
width: auto;

0 commit comments

Comments
 (0)