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

Provide way to set focus target when opening dialog #1468

Closed
tuckerjt07 opened this issue Oct 11, 2016 · 2 comments · Fixed by #1752
Closed

Provide way to set focus target when opening dialog #1468

tuckerjt07 opened this issue Oct 11, 2016 · 2 comments · Fixed by #1752
Assignees
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@tuckerjt07
Copy link

Bug, feature request, or proposal:

For dialogs with titles do not force focus onto the title cancel button (usually an X icon button in the right section of the title area). Or can we have this so that we can manually override.

What is the expected behavior?

Focus the first non-button input instead

What is the current behavior?

The cancel button is focused.

What are the steps to reproduce?

Create a custom dialog with a button as the first input HTML element in the document.

Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: http://plnkr.co/edit/o077B6uEiiIgkC0S06dd

What is the use-case or motivation for changing an existing behavior?

I understand the use case, especially around accessibility issues, but it would provide a better experience in this case not to have it.

Which versions of Angular, Material, OS, browsers are affected?

Is there anything else we should know?

@jelbourn jelbourn added the feature This issue represents a new feature or feature request rather than a bug or bug fix label Oct 18, 2016
@jelbourn jelbourn changed the title md-button auto focus in md-dialog Provide way to set focus target when opening dialog Oct 18, 2016
@jelbourn jelbourn added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Oct 18, 2016
@jelbourn jelbourn self-assigned this Oct 18, 2016
@jelbourn
Copy link
Member

The real feature needed here is the ability to set the focus target should be for dialog open.

@crisbeto crisbeto added the has pr label Nov 6, 2016
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 6, 2016
Adds the ability to specify an element that should take precedence over other focusable elements inside of a focus trap.

Fixes angular#1468.
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 8, 2016
Adds the ability to specify an element that should take precedence over other focusable elements inside of a focus trap.

Fixes angular#1468.
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 8, 2016
Adds the ability to specify an element that should take precedence over other focusable elements inside of a focus trap.

Fixes angular#1468.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants