Closed Bug 1545156 Opened 7 years ago Closed 7 years ago

HTMLSelectElement appears initially disabled if one of its options is disabled

Categories

(Core :: DOM: Core & HTML, defect)

66 Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: ericxguo, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36

Steps to reproduce:

  1. Create a <select> element with a number of <option>s
  2. One of the <option>s is a placeholder with a disabled property
  3. Have the <select> default to the placeholder disabled <option>

Actual results:

The entire <select> element (i.e. all <option>s within the dropdown) appear as disabled/readonly. However the non-disabled <option>s are still selectable. And when a valid <option> is selected, the <select> is rendered as expected, with only the placeholder <option> disabled and all other enabled. See attached gif for clarification.

Expected results:

Only the disabled <option> should appear disabled, with other <option>s appear enabled.

ericxguo,
Can you please attach testcase or public url?

Flags: needinfo?(ericxguo)
Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core

I tried to write a testcase per description in comment 0. I wasn't sure if I understood the STR correctly, but that said, I couldn't reproduce this issue.
https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=6921 worked as expected.

Going to close; please feel free to reopen if I got it wrong, and I'd appreciate a complete simple testcase.

Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Flags: needinfo?(ericxguo)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: