Skip to content

v0.6.27

Choose a tag to compare

@github-actions github-actions released this 09 Jun 07:08
· 9 commits to main since this release
Fix DuplicateIds crash when opening a menu while another closes

Every MenuDropdown shared a fixed id="menu-dropdown". Textual's remove() is
async (it only schedules a prune), so opening a second menu before the first
dropdown drained mounted a new widget with the same id and crashed in
_ensure_unique_id (DuplicateIds). Rapid clicks stacked several.

Drop the fixed id so transient dropdowns can never collide, and have close_menu
remove every MenuDropdown by type (not just the tracked reference, which rapid
open/close can lose). Removal stays fire-and-forget: awaiting the prune of a
dropdown from inside one of its own MenuItem click handlers deadlocks (the
menu_select path).

376 tests green; ruff + mypy clean.