-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
hmtl: Add a test for an autofocus issue with <dialog> #19151
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compact and to the point, nice test. LGTM % nit
promise_test(async () => { | ||
const dialog = document.querySelector('dialog'); | ||
dialog.show(); | ||
assert_equals(document.activeElement, dialog.querySelector('[autofocus]')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add descriptions so that you tell which assert failed if there's a failure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Spec change is whatwg/html#4918. |
When the dialog focusing steps are called, we prevent further autofocusing for the document. This fixes #4788. Tests: web-platform-tests/wpt#19151
whatwg/html#4788