Skip to content

feat: toggle menus on click#793

Open
kx0101 wants to merge 1 commit intomicrosoft:mainfrom
kx0101:fix/toggle-menus
Open

feat: toggle menus on click#793
kx0101 wants to merge 1 commit intomicrosoft:mainfrom
kx0101:fix/toggle-menus

Conversation

@kx0101
Copy link
Copy Markdown
Member

@kx0101 kx0101 commented Apr 3, 2026

Closes #80

menus now close when their button is clicked again

we track which menu button opened through menubar_toggle_id field on Tui. When a menu button is clicked and its ID matches the stored toggle ID, focus is popped to close the menu

Then, the toggle ID is only set after the mouse is released, so that we avoid situations where first click immediately triggers the close

It's cleared when focus leaves the menubar entirely

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.

Toggle menus

1 participant