HTMLInputElement.select() is not throwing InvalidStateError when it does not apply |
|||
Issue descriptionChrome 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.
,
Jan 20 2017
I think it's specification/test error. https://github.com/whatwg/html/issues/2275
,
Feb 10 2017
The specification was updated. |
|||
►
Sign in to add a comment |
|||
Comment 1 by cvrebert@google.com
, Jan 20 2017