Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Menu triggers autofocus on mount #24981

Closed
2 tasks done
NotWoods opened this issue Sep 27, 2022 · 1 comment · Fixed by #25016
Closed
2 tasks done

[Bug]: Menu triggers autofocus on mount #24981

NotWoods opened this issue Sep 27, 2022 · 1 comment · Fixed by #25016
Assignees

Comments

@NotWoods
Copy link
Contributor

Library

React Components / v9 (@fluentui/react-components)

System Info

N/A

Are you reporting Accessibility issue?

no

Reproduction

https://codesandbox.io/s/suspicious-lamarr-s2ps37?file=/example.tsx

Bug Description

Actual Behavior

When a menu trigger mounts, it automatically focuses itself

Expected Behavior

The menu trigger doesn't force focus

Logs

No response

Requested priority

High

Products/sites affected

Microsoft Loop

Are you willing to submit a PR to fix?

no

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.
@behowell
Copy link
Contributor

behowell commented Sep 29, 2022

It looks like this is likely a regression from #24738.

I've created a PR with a potential fix, but I'm not familiar enough with the original change to know if this is the correct fix. More details are in the PR:

@behowell behowell self-assigned this Sep 29, 2022
@behowell behowell added Type: Regression 🌩🌩 Lightning strikes twice. and removed Needs: Triage 🔍 labels Sep 29, 2022
@bsunderhus bsunderhus assigned bsunderhus and ling1726 and unassigned behowell Oct 3, 2022
@msft-fluent-ui-bot msft-fluent-ui-bot added Status: Fixed Fixed in some PR and removed Status: In PR labels Oct 3, 2022
@microsoft microsoft locked as resolved and limited conversation to collaborators Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants