Skip to content

fix(file-picker): prevent double-click crash during refresh - #349

Open
Jonathan0823 wants to merge 1 commit into
Maxteabag:mainfrom
Jonathan0823:fix/file-picker-double-click-crash
Open

Jonathan0823 wants to merge 1 commit into
Maxteabag:mainfrom
Jonathan0823:fix/file-picker-double-click-crash

Conversation

@Jonathan0823

Copy link
Copy Markdown

Summary

Fixes #348.

Prevent Textual's mouse text-selection path from starting on file-picker entry labels. A rapid second click can arrive after directory navigation has detached the previous row, causing Screen._forward_event() to dereference a missing parent and crash with AttributeError: 'NoneType' object has no attribute 'region'.

The file-picker rows remain clickable for directory navigation; keyboard navigation is unchanged.

Testing

  • Added a UI test asserting file-picker entry labels are not text-selectable and mouse navigation still works.
  • Manually reproduced the double-click crash on sqlit 1.6.5 / Textual 8.2.8; verified it no longer crashes with this change.
  • pytest -q tests/ui: 417 passed.
  • Ruff checks and formatting passed.

Related upstream Textual report: Textual issue #6643; proposed upstream fix: Textual PR #6645.

This branch has not been deployed

No deployments
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.

Double-clicking a directory in the export picker crashes the TUI

1 participant