New issue
Advanced search Search tips

Issue 683014 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

HTMLInputElement.select() is not throwing InvalidStateError when it does not apply

Project Member Reported by cvrebert@google.com, Jan 20 2017

Issue description

Chrome Version: 55.0.2883.95
OS: macOS 10.12.2

What steps will reproduce the problem?
(1) Open http://w3c-test.org/html/semantics/forms/the-input-element/selection.html in Chrome.
(2) Observe the test results.

What is the expected result?
None of the tests should fail.

What happens instead?
Several of the tests fail due to assertions along the lines of:
  Fail: input type hidden should not support the select() method
    assert_throws: function "function () { input.select(); }" did not throw

Further details:
Per https://html.spec.whatwg.org/multipage/forms.html#textFieldSelection:do-not-apply
> For <input> elements, calling these methods [select(), setSelectionRange(), setRangeText()]
> while they don't *apply*, [...] must throw an "InvalidStateError" DOMException;

Whether these methods *apply* depends on the <input>'s `type`, as explained in
https://html.spec.whatwg.org/multipage/forms.html#concept-input-apply

Apparently Chrome isn't throwing an error in cases where the spec says it should.
 

Comment 1 by cvrebert@google.com, Jan 20 2017

Components: Blink>Forms

Comment 2 by tkent@chromium.org, Jan 20 2017

Status: ExternalDependency (was: Untriaged)
I think it's specification/test error.

https://github.com/whatwg/html/issues/2275

Comment 3 by tkent@chromium.org, Feb 10 2017

Status: WontFix (was: ExternalDependency)
The specification was updated.

Sign in to add a comment