Skip to content

Fix stale SelectableStatic mouse events in TUI#461

Open
HamsteRider-m wants to merge 1 commit into
lsdefine:mainfrom
HamsteRider-m:fix/tui-stale-selectablestatic-460
Open

Fix stale SelectableStatic mouse events in TUI#461
HamsteRider-m wants to merge 1 commit into
lsdefine:mainfrom
HamsteRider-m:fix/tui-stale-selectablestatic-460

Conversation

@HamsteRider-m
Copy link
Copy Markdown

Summary

  • Guard TUI mouse events that target stale SelectableStatic message widgets after refresh/remount cycles.
  • Clear selection on stale MouseDown and stop stale MouseDown/MouseMove propagation before Textual dispatch asserts on a missing parent.
  • Add focused regression tests for stale, mounted, offset-less, and non-target mouse events.

Verification

  • python3 -m py_compile frontends/tuiapp_v2.py
  • python3 -m unittest discover -s tests -v
  • python3 -m pytest tests/test_tui_stale_selectable.py -v
  • Independent verifier: VERDICT: PASS

Closes #460

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.

TUI can crash on stale SelectableStatic MouseDown after message refresh

1 participant