New issue
Advanced search Search tips

Issue 636322 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 424578
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



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.

 

Comment 1 by ajha@chromium.org, Aug 11 2016

Cc: ajha@chromium.org
Components: Blink>Forms>Select
Labels: Needs-Feedback
jkew@: Could you please review the attached screenshot and test files and confirm if anything missed here. Tested this on Mac OS 10.11.5 & I am not seeing any difference b/w Safari and Chrome with the above test cases.


Appreciate your response!
636322_1.html
95 bytes View Download
636322_2.html
95 bytes View Download
636322.png
183 KB View Download

Comment 2 by j...@mozilla.com, 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.

Comment 3 by ajha@chromium.org, Aug 11 2016

Labels: -Type-Bug -Pri-3 -Needs-Feedback M-54 hasbisect OS-Linux OS-Mac OS-Windows Pri-1 Type-Bug-Regression
Owner: keishi@chromium.org
Status: Assigned (was: Unconfirmed)
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!   

Comment 4 by tkent@chromium.org, Aug 11 2016

Mergedinto: 424578
Status: Duplicate (was: Assigned)

Sign in to add a comment