Skip to content

fix: preserve active attribute on menu-bar button while submenu is open (#11331) (CP: 25.0)#11337

Merged
web-padawan merged 1 commit into25.0from
cherry-pick-11331-to-25.0-1773306644159
Mar 12, 2026
Merged

fix: preserve active attribute on menu-bar button while submenu is open (#11331) (CP: 25.0)#11337
web-padawan merged 1 commit into25.0from
cherry-pick-11331-to-25.0-1773306644159

Conversation

@vaadin-bot
Copy link
Copy Markdown
Collaborator

This PR cherry-picks changes from the original PR #11331 to branch 25.0.


Original PR description

Summary

  • Override _setActive() in MenuBarButton to skip deactivation while the button has the expanded attribute, preserving the pressed visual state while the sub-menu is open
  • Fixes keyboard (Enter/Space) and mouse click interactions where ActiveMixin listeners were removing the active attribute immediately after _setExpanded() set it

Fixes #11315

Test plan

  • Added tests verifying active attribute is preserved when opening submenu via Enter, Space, and click
  • Added test verifying active attribute is removed when submenu closes
  • All existing menu-bar tests pass (180/180)

🤖 Generated with Claude Code

…en (#11331)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@web-padawan web-padawan merged commit 9d21722 into 25.0 Mar 12, 2026
10 checks passed
@web-padawan web-padawan deleted the cherry-pick-11331-to-25.0-1773306644159 branch March 12, 2026 09:13
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.

2 participants