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

Closing Dialog that has captured focus resets focus to start of document #968

Open
oyvind-stenhaug opened this issue Sep 6, 2021 · 0 comments

Comments

@oyvind-stenhaug
Copy link

Steps to reproduce:

  1. Open https://www.sanity.io/ui/docs/component/dialog
  2. After the <Text>Content</Text> line in the editor, add <Button text="test" />
  3. Click "Open dialog"
  4. Press Esc (or Tab to focus the close button, then Enter)
  5. Press Tab

Expected result:
Should focus the "JSX" tab (I would expect it to "pick up where it left off")

Actual result:
Focuses "Read the blog post" link at the very top of the document

Or is every user of the Dialog component expected to code the logic for this themselves using the onClose callback? (If so, perhaps the example code should include that part too? It doesn't seem obvious to me.)

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

No branches or pull requests

1 participant