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

hmtl: Add a test for an autofocus issue with <dialog> #19151

Merged
merged 3 commits into from Nov 7, 2019

Conversation

tkent-google
Copy link
Contributor

Copy link
Member

@foolip foolip left a 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]'));
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@foolip
Copy link
Member

foolip commented Sep 19, 2019

Spec change is whatwg/html#4918.

domenic pushed a commit to whatwg/html that referenced this pull request Nov 7, 2019
When the dialog focusing steps are called, we prevent further
autofocusing for the document. This fixes #4788.

Tests: web-platform-tests/wpt#19151
@domenic domenic merged commit 64fff8f into master Nov 7, 2019
@domenic domenic deleted the tkent-dialog-autofocus-twice branch November 7, 2019 19:00
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.

None yet

5 participants