GithubHelp home page GithubHelp logo

UndoManager: Undoing combination of Y.Map#set and deleting that Y.Map from parent Y.Array results in 1 client with invalid Y.Map about yjs HOT 4 OPEN

francisduvivier avatar francisduvivier commented on September 26, 2024 1
UndoManager: Undoing combination of Y.Map#set and deleting that Y.Map from parent Y.Array results in 1 client with invalid Y.Map

from yjs.

Comments (4)

francisduvivier avatar francisduvivier commented on September 26, 2024

Note: we also found another woraround
When using { ignoreRemoteMapChanges: true } in the UndoManager constructor, this issue is also not reproducible.

from yjs.

cacosandon avatar cacosandon commented on September 26, 2024

I have the same issue. Another workaround is using captureTimeout: 0 so the set + delete are not stacked together.

It's this same issue:
#443

It was resolved, but seems that it's happening again.

from yjs.

francisduvivier avatar francisduvivier commented on September 26, 2024

I have the same issue. Another workaround is using captureTimeout: 0 so the set + delete are not stacked together.

It's this same issue: #443

It was resolved, but seems that it's happening again.

Issue is slightly different than #443 in the sense that only the second client has the bad map in this bug here

from yjs.

markcrispo avatar markcrispo commented on September 26, 2024

I also just hit this issue using XmlFragments and was doing some digging with the debugger before finding this issue.

UndoManager calls redoItem to remake the map and keys. When remaking the Item for 'before change', origin is set to the now-deleted item 'changed content', but parent correctly points to the new, re-created map.

Then the function Item.write serializes the items to sync remote clients, but Item.write only encodes parent if origin is null, so remote clients only see that the 'before change' key has an origin pointing to the deleted map key. As far as I can tell, it looks like remote clients are connecting the recreated key to the deleted map, instead of the recreated map.

from yjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.