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

Two bugs in html/semantics/forms/the-input-element/input-textselection-01.html #2094

Closed
tkent-google opened this issue Aug 17, 2015 · 2 comments

Comments

@tkent-google
Copy link
Contributor

var valid = ["text", "search", "url", "tel", "email", "password"];

It expects type=email is in the valid class. But the specification says type=email doesn't have the selection API.
http://www.w3.org/TR/html5/forms.html#e-mail-state-(type=email)

The following IDL attributes and methods do not apply to the element: checked, files, selectionStart, selectionEnd, selectionDirection, valueAsDate, and valueAsNumber IDL attributes; select(), setRangeText(), setSelectionRange(), stepDown() and stepUp() methods.

  assert_throws("INVALID_STATE_ERR", function() { input.select(); }, "Should throw with type " + aType);

For the invalid class, the test expects INVALID_STATE_ERR is thrown. It's correct according to W3C HTML 5.0. However, HTML 5.1 and WHATWG HTML changed coverage of select(). Email, date, datetime, datetime-local, month, time, week, number, color, and file types support select() and they shouldn't throw an exception.

@tkent-google
Copy link
Contributor Author

The test was renamed to the-input-element/selection.html.
It still has the second problem.

https://html.spec.whatwg.org/multipage/forms.html#dom-textarea/input-select

In the case of input elements, if the control has no text field, then the method must do nothing.

@tkent-google
Copy link
Contributor Author

This was fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant