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

MenuItem on Beta branch can't be unselected #7769

Closed
githubdoramon opened this issue Aug 15, 2017 · 2 comments
Closed

MenuItem on Beta branch can't be unselected #7769

githubdoramon opened this issue Aug 15, 2017 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@githubdoramon
Copy link

githubdoramon commented Aug 15, 2017

Problem description

I have a Menu with two MenuItems, and wan't it to open with no one selected, but even setting the selected={false} on both items makes the first item always open selected.

Steps to reproduce

              <Menu
                anchorEl={this.state.anchorEl}
                open={this.state.shareOpen}
                onRequestClose={this.closeShare}
              >
                <MenuItem selected={false} onClick={this.shareFB}>
                  <ListItemIcon>
                    <FaFace />
                  </ListItemIcon>
                  Facebook
                </MenuItem>
                <MenuItem selected={false} onClick={this.copyUrl}>
                  <ListItemIcon>
                    <FaClipboard/>
                  </ListItemIcon>
                  <FormattedMessage id="copy.url" defaultMessage="Copy address"/>
                </MenuItem>
              </Menu>

Versions

  • Material-UI: Beta
  • React: 16
  • Browser: Chrome
@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 15, 2017

The MenuItem isn't selected. It's focused for accessibility considerations.
I'm closing this issue for #5186.

@oliviertassinari oliviertassinari added the duplicate This issue or pull request already exists label Aug 15, 2017
@githubdoramon
Copy link
Author

@oliviertassinari thanks for the clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants