Closed Bug 328393 Opened 18 years ago Closed 18 years ago

xf:copy of element node then text node results in wrong instance data

Categories

(Core Graveyard :: XForms, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aaronr, Assigned: aaronr)

References

Details

(Keywords: fixed1.8.0.4, fixed1.8.1)

Attachments

(2 files)

I have a xf:select that has both regular items and copyItems in it.  If I select a regular item then a copyItem (with the control key down so that both items are selected), the instance data correctly shows the bound node containing a single textnode with the first value followed by the element node from the copyItem.  However, if I select the copyItem first and THEN the text node, then under the bound node I get a textnode containing the firstvalue AND the textcontents from the copyItem element node, followed by the copyItem's element node.  U-G-L-Y!!!
Attached file testcase
Status: NEW → ASSIGNED
Summary: xf:copy of element node then tex node results in wrong instance data → xf:copy of element node then text node results in wrong instance data
Attached patch proposed fixSplinter Review
Attachment #213097 - Flags: review?(doronr)
Attachment #213097 - Flags: review?(smaug)
problem was that I was using contentEnvelope.textContent to set the value of the bound node's text node when there were no copyItems newly selected.  But textContent gives too much information.  What I should have been using was contentEnvelope.firstChild.nodeValue or null (in the case where no item was selected).
Attachment #213097 - Flags: review?(doronr) → review+
Attachment #213097 - Flags: review?(smaug) → review+
checked into the trunk
Whiteboard: xf-to-branch
Blocks: 326556
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Blocks: 332853
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: