We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug yText delta attributes are not correct when undo.
To Reproduce Steps to reproduce the behavior:
Expected behavior BBB's attribute is its origin set value
Screenshots
Environment Information
Additional context vue demo code:
// Client A const ydoc = new Y.Doc() const ymap = ydoc.getMap("root") const contentText = new Y.Text() const propertyMap = new Y.Map() ymap.set('docContent', contentText) ymap.set('propertyMap', propertyMap) const undoManager = new Y.UndoManager(ymap, {trackedOrigins: new Set(['trackUndo'])}) ymap.observeDeep((events: Y.YEvent<any>[], transaction: Y.Transaction) => { console.info(events, 'events A>>>>>>>>>>>>') }) ydoc.transact(() => { contentText.insert(0, 'S', {type: 'MK_E_9', id: 'C_000'}) }, 'trackUndo') undoManager.stopCapturing() ydoc.transact(() => { contentText.insert(1, 'AAAAA', {type: '10', id: 'C_001'}) previewText('ClientA insert S and AAAAA', contentText) }, 'trackUndo') //Client B const ydocRemote = new Y.Doc() syncA2B(ydoc, ydocRemote) const ymapRemote = ydocRemote.getMap("root") const propertyMapB = ymapRemote.get('propertyMap') as Y.Map<any> const contentTextB = ymapRemote.get('docContent') as Y.Text contentTextB.insert(3, 'BBB', {type: '10', id: 'C_003'}) syncB2A(ydocRemote, ydoc) previewText('ClientB insert BBB in AAAAA', contentText) //Client A undoManager.undo() previewText('ClientA undo', contentText) function syncA2B(ydocA, ydocB) { Y.applyUpdate(ydocB, Y.encodeStateAsUpdate(ydocA)) } function syncB2A(ydocB, ydocA) { Y.applyUpdate(ydocA, Y.encodeStateAsUpdate(ydocB)) } function previewText(desc:string, yText: Y.Text) { previewTexts.value.push({delta: yText.toDelta(), content: yText.toString(), desc: desc}) }
The text was updated successfully, but these errors were encountered:
dmonad
No branches or pull requests
Describe the bug
yText delta attributes are not correct when undo.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
BBB's attribute is its origin set value
Screenshots
Environment Information
Additional context
vue demo code:
The text was updated successfully, but these errors were encountered: