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,caught TypeError: Cannot read properties of undefined (reading 'nodeSize') #1075

Open
1 task done
sing-jump-rap opened this issue Sep 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sing-jump-rap
Copy link

sing-jump-rap commented Sep 14, 2024

Describe the bug
仿照官方文档"https://www.blocknotejs.org/docs/advanced/real-time-collaboration"中的示例
将"y-webrtc"修改为"y-websocket",其余部分不变。
用户a编辑文档A并且新建了多个block同时用户b进入文档A就会报这个错误。
如果用户a修改文档后把光标点击到第一个block上,用户b进入文档A就不会报这个错误。
我认为是光标的读取获取存在bug

To Reproduce
import * as Y from "yjs";
import { WebsocketProvider } from "y-websocket";
// ...

const doc = new Y.Doc();

const provider = new WebsocketProvider(
"wss://demos.yjs.dev", // 官方demo的WebSocket地址
"your-room-name", // 替换为您想要的房间名称
doc
);
const editor = useCreateBlockNote({
// ...
collaboration: {
// The Yjs Provider responsible for transporting updates:
provider,
// Where to store BlockNote data in the Y.Doc:
fragment: doc.getXmlFragment("document-store"),
// Information (name and color) for this user:
user: {
name: "My Username",
color: "#ff0000",
},
},
// ...
});

Misc

  • Node version: 16.15.0、18.18.0
  • Package manager: 0.15.3、0.15.4
  • Browser:
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖
@sing-jump-rap sing-jump-rap added the bug Something isn't working label Sep 14, 2024
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

1 participant