Closed Bug 278202 Opened 20 years ago Closed 20 years ago

Select won't update properly if bound node changes

Categories

(Core Graveyard :: XForms, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aaronr, Assigned: aaronr)

References

Details

Attachments

(3 files)

using patch to 265467 I found that a select element won't be properly updated
via nsXFormsSelectElement::Refresh().  Even though all of the items are removed
and re-inserted into mSelect, it seems to remember the selected items.  So if a
new value is given via another control to instance data that is also bound to
the select control, the old value that was selected will stay selected and the
new value will also be selected.  I have a testcase and a fix.  Just need to set
the selected index to -1 after mSelect is populated and before the mSelect is
re-sync'd with the bound node.
Type "Vanilla Chocolate" in the textfield then hit the TAB key, it should
select both elements.  Then type "Chocolate" in the textfied and hit the TAB
key.  That should cause only Chocolate to be selected.
Attached patch proposed fixSplinter Review
proposed fix
Attachment #171116 - Flags: superreview?(bryner)
Attachment #171116 - Flags: review?(allan)
Aarons testcase depends on the MDG patch in bug 265467. Here's one where you
can manually emit xforms-refresh events after changing values.
Status: NEW → ASSIGNED
Depends on: 270572
Comment on attachment 171116 [details] [diff] [review]
proposed fix

r=me
Attachment #171116 - Flags: review?(allan) → review+
Attachment #171116 - Flags: superreview?(bryner) → superreview+
bryner checked in fix for me 01/16
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
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: