Skip to content

fix(web-components): fix enterkey interaction on menu#31894

Merged
davatron5000 merged 4 commits into
microsoft:masterfrom
davatron5000:davatron5000/fix-menu-enterkey-interaction
Jul 2, 2024
Merged

fix(web-components): fix enterkey interaction on menu#31894
davatron5000 merged 4 commits into
microsoft:masterfrom
davatron5000:davatron5000/fix-menu-enterkey-interaction

Conversation

@davatron5000

@davatron5000 davatron5000 commented Jul 1, 2024

Copy link
Copy Markdown
Contributor

Previous Behavior

Opening the menu component and selecting a menuitem with enterkey should trigger the menu to close unless it's a menuitemradio or menuitemcheckbox.

New Behavior

  • Make Menu listen for the change event emitted by menu-item.ts#L220
  • Add tests 👍👍👍

Related Issue(s)

Adding @mlijanto as a reviewer to verify fix for upstream usage.

@davatron5000
davatron5000 requested a review from mlijanto July 1, 2024 20:30
@davatron5000
davatron5000 requested a review from a team as a code owner July 1, 2024 20:30
@fabricteam

fabricteam commented Jul 1, 2024

Copy link
Copy Markdown
Collaborator

📊 Bundle size report

✅ No changes found

@mlijanto mlijanto 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.

Thanks for fixing this issue and adding the tests @davatron5000! Looks good to me 👍🏼. Only left a couple of small comments.

Comment thread packages/web-components/src/menu/menu.ts Outdated
Comment thread packages/web-components/src/menu/menu.ts Outdated

@marchbox marchbox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM other than a small thing.

Comment thread packages/web-components/src/menu/menu.ts
@davatron5000
davatron5000 enabled auto-merge (squash) July 2, 2024 20:05
@davatron5000
davatron5000 merged commit 2ccb9dd into microsoft:master Jul 2, 2024
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Jul 3, 2024
* master: (45 commits)
  Added unit testcases for sparkline chart. (microsoft#31843)
  release: applying package updates - react v8
  release: applying package updates - web-components
  fix(web-components): fix enterkey interaction on menu (microsoft#31894)
  chore(web-components): expose field to package exports (microsoft#31904)
  fix(web-components): slotted elements within fluent-text-input can't be focused (microsoft#31903)
  fix(web-components): fix menu positioning in firefox (microsoft#31895)
  chore: bump @types/node types to v20 and @tsconfig to v18 (microsoft#31510)
  chore: migrate to nx 19.2.3 (microsoft#31828)
  chore: fix install verdacio command (microsoft#31897)
  fix(scripts-prettier): escape file names that are being passed to prettier bin via shell (microsoft#31889)
  release: applying package updates - react-components
  feat:(docs) Adds pattern doc on Basic Recomposition (microsoft#31861)
  chore:(docs) Archive the wiki 🎉 (microsoft#31202)
  feat:(react-nav-preview) Adds NavDivider implementation (microsoft#31848)
  ci(.github): resolve due_on UTC time creation issues (microsoft#31890)
  release: applying package updates - web-components
  fix: update internal usage of useModalAttributes to use legacyTrapFocus by default (microsoft#31801)
  chore: make utils a package export (microsoft#31865)
  fix: add live region around scroll index update (microsoft#31863)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[web-components] Menu-list is not closed when an item is selected using keyboard

6 participants