Skip to content
New issue

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

Bug: prosemiror-table columnResizing not compatible with YJS sync #27

Open
zlv-thisF opened this issue Oct 16, 2020 · 3 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@zlv-thisF
Copy link

zlv-thisF commented Oct 16, 2020

Describe the bug
if anyone is resizing the table columns, and others are keep typing in the table, prosemirror collapse due to unexpected position after tr.mapping

To Reproduce
Steps to reproduce the behavior:
https://codesandbox.io/s/relaxed-herschel-el656?file=/src/App.js
site: https://el656.csb.app/

  1. open incognito chrome
  2. open chrome
  3. in incognito chrome page, setInterval insert innerText on chrome dev console in first table cell to simulate edit
    for example, setInterval(() => { document.querySelector('td').innerText += "1" }, 1000 )
  4. in chrome page, resize the table column
  5. chrome page collapse

Expected behavior
The columnResizing in prosemirror-table can get correct position instead of null which lead to error in handleDecorations.

Screenshots
image

Additional context
It seems that after editor got update from server, yjs will turn the whole yXmlElement into prosemirror's slice, so tr.mapping cannot get correct position derivation from the tr.steps.
image
image

@zlv-thisF zlv-thisF added the bug Something isn't working label Oct 16, 2020
@cobbcheng
Copy link

Is there a way to fix this issue?

@ascott18
Copy link

This looks like a combination of ProseMirror/prosemirror-tables#141 and #113

@cobbcheng
Copy link

This looks like a combination of ProseMirror/prosemirror-tables#141 and #113

thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants