Issue metadata
Sign in to add a comment
|
inconsistent behavior of innerText on <option> elements, depending on size of parent <select>
Reported by
j...@mozilla.com,
Aug 10 2016
|
||||||||||||||||||||||||
Issue description
Chrome Version : 52.0.2743.116 (Official Build) (64-bit)
URLs (if applicable) : see testcases below
Other browsers tested:
Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
Safari: OK - Version 9.0.2 (9537.86.3.9.1)
Firefox: FAIL - innerText is not supported for <option> elements (see https://bugzilla.mozilla.org/show_bug.cgi?id=1290937)
IE: untested
What steps will reproduce the problem?
Consider the two testcases:
(a) data:text/html,<select size=1><option>foo</option></select>
Result: $('option').innerText returns "foo"
(b) data:text/html,<select size=2><option>foo</option></select>
Result: $('option').innerText returns ""
What is the expected result?
The <option> element's innerText should be unaffected by the size attribute of its parent <select>.
What happens instead?
Different innerText behavior in the two examples, as noted above. The size attribute causes the <select> to display its options as a list rather than a pop-up, but that's no reason to change the behavior of innerText on the <option> element(s) within it.
,
Aug 11 2016
The issue isn't the rendering, but the result of accessing $('option').innerText in each case. So having loaded the test files, open the developer tools in each browser, enter $('option').innerText in the console, and note the result.
What I see (on OS X 10.9.5) is that Safari returns "foo" in both testcases, whereas Chrome returns "foo" in case 1, and "" (empty) in case 2.
,
Aug 11 2016
Thanks for the clarification,able to reproduce the issue on the latest canary(54.0.2826.0) and the latest stable(52.0.2743.116) on Windows-7, Mac OS 10.11.5 and Linux Ubuntu 14.04. This is regression issue broken in M-38. Last good build: 38.0.2096.0 First bad build: 38.0.2097.0 Changelog: =========== https://chromium.googlesource.com/chromium/src/+log/001bbfdc4da9f8aec8e1a30770a1e4cef2347e0a..4723c87ef3007d63a5736a347d000dbe2076d023 Blink changelog: ================ https://chromium.googlesource.com/chromium/blink/+log/a9e95994fc9a0ebcde9322304a800751de702a32..4f2becd2d1fb613afa9e6a73b7f02b478be6f884?pretty=fuller&n=10000 Suspecting: https://codereview.chromium.org/347773002 keishi@: Could you please take a look at this. Thank you!
,
Aug 11 2016
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by ajha@chromium.org
, Aug 11 2016Components: Blink>Forms>Select
Labels: Needs-Feedback
95 bytes
95 bytes View Download
95 bytes
95 bytes View Download
183 KB
183 KB View Download