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

RESOLVED FIXED

Status

Core Graveyard
XForms
RESOLVED FIXED
12 years ago
2 years ago

People

(Reporter: aaronr, Assigned: aaronr)

Tracking

({fixed1.8.0.4, fixed1.8.1})

Trunk
x86
All
fixed1.8.0.4, fixed1.8.1
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

2.12 KB, application/xhtml+xml
Details
1.80 KB, patch
Doron Rosenberg (IBM)
: review+
smaug
: review+
Details | Diff | Splinter Review
(Assignee)

Description

12 years ago
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!!!
(Assignee)

Comment 1

12 years ago
Created attachment 212984 [details]
testcase
(Assignee)

Updated

12 years ago
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
(Assignee)

Comment 2

12 years ago
Created attachment 213097 [details] [diff] [review]
proposed fix
Attachment #213097 - Flags: review?(doronr)
(Assignee)

Updated

12 years ago
Attachment #213097 - Flags: review?(smaug)
(Assignee)

Comment 3

12 years ago
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).

Updated

12 years ago
Attachment #213097 - Flags: review?(doronr) → review+

Updated

12 years ago
Attachment #213097 - Flags: review?(smaug) → review+
(Assignee)

Comment 4

12 years ago
checked into the trunk
Whiteboard: xf-to-branch
(Assignee)

Updated

12 years ago
Blocks: 326556

Updated

12 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED

Updated

12 years ago
Blocks: 332853

Updated

12 years ago
Keywords: fixed1.8.0.3, fixed1.8.1

Updated

12 years ago
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.