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

Use autoFocus to focus on elements inside modal dialogs #536

Open
paulschreiber opened this issue Sep 13, 2022 · 0 comments
Open

Use autoFocus to focus on elements inside modal dialogs #536

paulschreiber opened this issue Sep 13, 2022 · 0 comments

Comments

@paulschreiber
Copy link
Member

Use autoFocus to focus on elements inside modal dialogs. See mui/material-ui#34252 (comment) for an example.

<Dialog open={isOpen}>
  <DialogTitle>Title</DialogTitle>
  <DialogContent>Hi mom</DialogContent>

  <DialogActions>
    <Button autoFocus>Hello</Button>
    <Button>There</Button>
  </DialogActions>
</Dialog>
<Button onClick={onClick}>Open</Button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

2 participants