Skip to content

Restore focus on dialog close when dialog is focused#59104

Draft
chromium-wpt-export-bot wants to merge 1 commit intomasterfrom
chromium-export-cl-7735579
Draft

Restore focus on dialog close when dialog is focused#59104
chromium-wpt-export-bot wants to merge 1 commit intomasterfrom
chromium-export-cl-7735579

Conversation

@chromium-wpt-export-bot
Copy link
Copy Markdown
Collaborator

Dialogs only restore focus to the previously focused element on close
when an element inside the dialog is focused. When there is no focusable
element inside of the dialog and the dialog element itself becomes
focused, we should restore focus to the previously focused element when
the dialog is closed.

This change matches the spec, which uses an inclusive descendant check
on the dialog element.

Fixed: 497884156
Change-Id: I48e0e617a82a3ebe784884bd60f7d81e2776b71d

Reviewed-on: https://chromium-review.googlesource.com/7735579
WPT-Export-Revision: f0f41654242f65e602d71f2f3ebb01d358f11ccf

Dialogs only restore focus to the previously focused element on close
when an element inside the dialog is focused. When there is no focusable
element inside of the dialog and the dialog element itself becomes
focused, we should restore focus to the previously focused element when
the dialog is closed.

This change matches the spec, which uses an inclusive descendant check
on the dialog element.

Fixed: 497884156
Change-Id: I48e0e617a82a3ebe784884bd60f7d81e2776b71d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants