Using repeat index for 1.1 delete does not work

RESOLVED FIXED

Status

Core Graveyard
XForms
RESOLVED FIXED
10 years ago
11 months ago

People

(Reporter: Merle Sterling, Assigned: Merle Sterling)

Tracking

({fixed1.8.1.5})

Trunk
x86
Windows XP
fixed1.8.1.5

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

1.78 KB, application/xhtml+xml
Details
3.36 KB, patch
aaronr
: review+
Doron Rosenberg (IBM)
: review+
Details | Diff | Splinter Review
(Assignee)

Description

10 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a5pre) Gecko/20070507 Minefield/3.0a5pre

Repeat indexes are not updated and no node is deleted when the delete location is specified by an xpath expression like index('lineset') [where 'lineset' is the id of the repeat.


Reproducible: Always

Steps to Reproduce:
Run the attached testcase and add a line or two and then select a row and delete it.

Actual Results:  
Current index does not change and no node is deleted.

Expected Results:  
Selected line should be deleted and current index updated to reflect the current number of rows.

Updated

10 years ago
Assignee: nobody → msterlin
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 1

10 years ago
Created attachment 271913 [details]
testcase
(Assignee)

Updated

10 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 2

10 years ago
Created attachment 271915 [details] [diff] [review]
patch

We were using the 'locationNode' to determine the instance data node for sending the insert/delete event. Because delete can now delete multiple nodes, the locationNode will get set to null when we reach the end of the set of nodes to delete and GetInstanceNodeForData will fail - we then exit without rebuild/recalculate/refresh and the display does not get updated.
Attachment #271915 - Flags: review?(aaronr)

Comment 3

10 years ago
Comment on attachment 271915 [details] [diff] [review]
patch

Actually, I think it'd be safer to perhaps get this earlier in the process since resNode has already been removed from the DOM in the case of 'delete'.
Attachment #271915 - Flags: review?(aaronr) → review-
(Assignee)

Comment 4

10 years ago
Created attachment 272034 [details] [diff] [review]
patch2

Getting the instance data node before performing the delete.
Attachment #271915 - Attachment is obsolete: true
Attachment #272034 - Flags: review?(aaronr)

Updated

10 years ago
Attachment #272034 - Flags: review?(aaronr) → review+
(Assignee)

Updated

10 years ago
Attachment #272034 - Flags: review?(doronr)

Updated

10 years ago
Attachment #272034 - Flags: review?(doronr) → review+

Updated

10 years ago
Attachment #271913 - Attachment mime type: application/octet-stream → application/xhtml+xml

Comment 5

10 years ago
checked into trunk and 1.8 branch for msterlin
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Keywords: fixed1.8.1.5
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.