ice icon indicating copy to clipboard operation
ice copied to clipboard

Insert operation in disableChangeTracking mode is still tracked after enabling

Open sanjeevi-v opened this issue 12 years ago • 5 comments

How to reproduce

  1. Initialize tracker
  2. enable tracking using tracker.enableChangeTracking() method
  3. add some content
  4. disable tracking using tracker.disableChangeTracking() method
  5. Type something in the middle of the previously inserted content
  6. Once again enable tracking.

iss1 iss2 iss3

sanjeevi-v avatar Mar 11 '13 12:03 sanjeevi-v

I'm not sure how to approach this problem. In the past, I have closed-out similar issues/requests. To make this work, we would have to get in the business of node splitting which can get really hairy.

In the nytimes editor, we removed the enable/disable button. Is that an option for you?

delambo avatar Mar 12 '13 01:03 delambo

Suppose we would do node splitting - we would have to give them two different cid's, correct? Else we will always delete one together with the other, is that correct? What would the mechanism to get new, and unused, cid values be? On Mar 11, 2013 9:01 PM, "Matthew DeLambo" [email protected] wrote:

I'm not sure how to approach this problem. In the past, I have closed-out similar issues/requests. To make this work, we would have to get in the business of node splitting which can get really hairy.

In the nytimes editor, we removed the enable/disable button. Is that an option for you?

— Reply to this email directly or view it on GitHubhttps://github.com/NYTimes/ice/issues/64#issuecomment-14752921 .

johanneswilm avatar Mar 12 '13 01:03 johanneswilm

CID's (Change IDs) aren't unique per element/node, but per change. For example, if a track change delete is in the middle of a selection:

[START]some <span class="del" cid="1">paragraph</span> text[END]

... and the user deletes, then the following html would be the result:

<span class="del" cid="2">some </span>
<span class="del" cid="1">paragraph</span>
<span class="del" cid="2"> text</span>

If we were to split a node, I think the two resulting nodes should retain the original cid since they represent the same change, by the same user, at the same time.

delambo avatar Mar 12 '13 02:03 delambo

Yes, from that view point it could make sense. But the person doing the editing afterward may not know that. He just sees two nodes that look as if they are separate. he accepts the first of them as a change, and will suddenly notice that also the second one was accepted. Or not? but hey, you have the field experience with this. If you say users can figure this out...

johanneswilm avatar Mar 12 '13 02:03 johanneswilm

Hi delambo, thanks for the response, according to the requirement which was given to me, enable and disable track changes are mandatory, it would be great if you can share any workarounds to solve this problem or give any idea so that it help me to solve it. I also thought about doing a node split, but if i do so, how to get the new node reference using getChanges() method. I am using this method to implement previous change, next change feature (another requirement).

sanjeevi-v avatar Mar 12 '13 09:03 sanjeevi-v