Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1828523 [wpt PR 39579] - Only restore dialog focus if focus is in…
… the dialog, a=testonly Automatic update from web-platform-tests Only restore dialog focus if focus is in the dialog Context: whatwg/html#8904 This patch prevents the behavior where closing a dialog focuses the previously focused element from before the dialog was opened only if focus is in the dialog when the dialog closes. Without this, focus can unexpectedly shift away from an element which is not going away, like a text input that the user is currently typing into for example. This matches the behavior we recently implemented for popovers. Change-Id: Id95cacf36b2eb24d3514f59bc8a1f718d643860e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4436533 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1145455} -- wpt-commits: a2848420dbdb869afb53e11706814c029a9911eb wpt-pr: 39579
- Loading branch information