Skip to content

refactor: use the public on_click handler - #332

Merged
henryiii merged 1 commit into
mainfrom
refactor/public-on-click
Nov 21, 2026
Merged

henryiii merged 1 commit into
mainfrom
refactor/public-on-click

Conversation

@henryiii

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

UprootTree overrode the private Textual method _on_click. It now uses the public on_click. Textual calls the handler of each class in the MRO and stops at prevent_default(), so Tree does not also select the node. This holds in Textual 5.0.0 and 8.2.8. The existing shift+click test fails if prevent_default() is removed.

Refs #322

Textual calls the handler of each class in the MRO, and
prevent_default() stops the base-class handlers, so the private
_on_click name is not needed.

Assisted-by: ClaudeCode:claude-sonnet-5-5
@henryiii
henryiii marked this pull request as ready for review November 21, 2026 02:08
@henryiii
henryiii merged commit 2707901 into main Nov 21, 2026
12 checks passed
@henryiii
henryiii deleted the refactor/public-on-click branch November 21, 2026 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant