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

Add some basic autofocus tests #9804

Merged
merged 3 commits into from Mar 7, 2018

Conversation

Projects
None yet
4 participants
@domenic
Copy link
Member

domenic commented Mar 5, 2018

Follows whatwg/html#3488, although certainly doesn't test the underlying issue exhaustively.

Edge, Firefox, and Chrome pass all these. Haven't tested Safari.

Add some basic autofocus tests
Follows whatwg/html#3488, although certainly doesn't test the underlying issue exhaustively.
@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Mar 5, 2018

Build PASSED

Started: 2018-03-07 06:25:08
Finished: 2018-03-07 06:33:16

Failing Jobs

  • MicrosoftEdge:16.16299

Unstable Results

Browser: "Microsoftedge 16.16299" (failures allowed)

View in: WPT PR Status | TravisCI

Test Subtest Results Messages
/html/semantics/forms/autofocus/not-on-first-task.html   TIMEOUT: 8
OK: 2
  The element is not focused during the initial parsing task PASS: 2
const input1 = document.querySelector("input");
const input2 = document.createElement("input");
input2.autofocus = true;

This comment has been minimized.

Copy link
@annevk

annevk Mar 7, 2018

Member

You're not inserting the element. It still get focus?

This comment has been minimized.

Copy link
@domenic

domenic Mar 7, 2018

Author Member

Well, the test is that input1 keeps the focus, so the test still passes. But yeah, this is a bug that makes the pass trivial. Fixing.

@annevk
Copy link
Member

annevk left a comment

first-when-later.html looks incorrect, otherwise LGTM.

domenic added a commit to whatwg/html that referenced this pull request Mar 7, 2018

@annevk

annevk approved these changes Mar 7, 2018

Copy link
Member

annevk left a comment

It'd be a little more compelling I think if you inserted it before the other input element, but this seems fine as initial tests.

@domenic

This comment has been minimized.

Copy link
Member Author

domenic commented Mar 7, 2018

Oh, good idea, Chrome fails that. I'll add it as a separate file and file a bug.

@annevk

annevk approved these changes Mar 7, 2018

@domenic domenic merged commit b92c2b1 into master Mar 7, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@domenic domenic deleted the autofocus branch Mar 7, 2018

alice added a commit to alice/html that referenced this pull request Jan 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.