Closed Bug 304928 Opened 20 years ago Closed 20 years ago

select1 will not select the last item in its list

Categories

(Core Graveyard :: XForms, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: aaronr, Assigned: aaronr)

Details

(Keywords: fixed1.8)

Attachments

(2 files)

Assume that you have a select1 containing an itemset. If the instance data is such that the last item in the select1's list of options should be initialized as selected, then the select1 will not show any selected item. Looks like it is because of the 'while' loop in nsXFormsItemSetElement::SelectItemByValue. It will never get to go through all of the child nodes fine, but since it is initializing the variable selectChild off of the variable tmp (which is uninitialized to begin with) then the call to SelectItemByValue is always the previous sibling to child and thus the last child will never be looked at.
Attached file testcase
testcase that shows the problem. The initial selected value in the select1 should be '45'.
Attached patch fixSplinter Review
quick fix. Just using child to create selectChild instead of tmp.
Attachment #192910 - Flags: superreview?(allan)
Attachment #192910 - Flags: review?(smaug)
Attachment #192910 - Flags: superreview?(allan)
Attachment #192910 - Flags: review?(smaug)
Attachment #192910 - Flags: review?(allan)
Attachment #192910 - Flags: review+
Attachment #192910 - Flags: review?(allan) → review+
Attachment #192910 - Flags: approval1.8b4?
checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Reopening so that we don't forget to check this in to branch too.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: xf-to-branch
Attachment #192910 - Flags: approval1.8b4? → approval1.8b4+
Comment on attachment 192910 [details] [diff] [review] fix in order to land on the branch, this needs to be resolved then verified on the trunk.
Attachment #192910 - Flags: approval1.8b4+ → approval1.8b4?
This has already been checked/verified on trunk.
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Attachment #192910 - Flags: approval1.8b4? → approval1.8b4+
Time is short for 1.8b4. If this isn't landed today, it's not going to make the train.
already landed
Keywords: fixed1.8
is the testcase broken? I'm not seeing a select form list with any browser.
(In reply to comment #10) > is the testcase broken? I'm not seeing a select form list with any browser. did you install the XForms extension (xforms.xpi)? The fix is contained in our extension
Removing xf-to-branch.
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: