Skip to content

Toggle menus on click - #793

Open
Elijah Koulaxis (kx0101) wants to merge 4 commits into
microsoft:mainfrom
kx0101:fix/toggle-menus
Open

Toggle menus on click#793
Elijah Koulaxis (kx0101) wants to merge 4 commits into
microsoft:mainfrom
kx0101:fix/toggle-menus

Conversation

@kx0101

Copy link
Copy Markdown
Member

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

@BrettKinny

Copy link
Copy Markdown

Yes please, good fix 👍️

@lhecker Leonard Hecker (lhecker) changed the title feat: toggle menus on click Toggle menus on click Aug 6, 2026

@lhecker Leonard Hecker (lhecker) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some mild adjustments, but the PR was great overall!
(In particular, one of the branches wasn't needed.)

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

3 participants