Closed Bug 453549 Opened 16 years ago Closed 10 years ago

setting options.length results in "setting a property that has only a getter"

Categories

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

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: crisp, Unassigned)

Details

(Keywords: regression)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b1pre) Gecko/20080903034741 Minefield/3.1b1pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b1pre) Gecko/20080903034741 Minefield/3.1b1pre Although the DOM level 2 specification allows implementations to make the length property of an HTMLOptionsCollection readonly the setting of this property is necessary for backcompat and defining it as readonly in Minefield 3.1 is a regression which will break many sites. Reproducible: Always Steps to Reproduce: 1. Target a SELECT element in the DOM that has options 2. Set the length property of the select.options collection to 0 Actual Results: A javascript error is raised: "setting a property that has only a getter" Expected Results: All associated option-elements should be removed from the SELECT element
Version: unspecified → Trunk
Flags: blocking-firefox3.1?
Thanks for the testcase that was super helpful. This looks like a regression, and it looks like it is specific to windows, can't reproduce on mac. Works on Firefox 2.0.0.x, 3.0.x. Works on: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b1pre) Gecko/20080830031750 Minefield/3.1b1pre Fails on: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b1pre) Gecko/20080831162801 Minefield/3.1b1pre The changelog for this is here, but I don't see anything that seems to have caused this: http://hg.mozilla.org/mozilla-central/log/03f2c43195a6 Moving to content, though it might also belong in the widget code.
Severity: major → normal
Status: UNCONFIRMED → NEW
Component: General → Content
Ever confirmed: true
Flags: blocking-firefox3.1?
Keywords: regression
Product: Firefox → Core
QA Contact: general
QA Contact: content
Component: Content → DOM
QA Contact: content → general
Not sure what fixed this.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: