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

插入表格,光标移至表格前方,控制台报错 #4376

Open
lcmomo opened this issue Jun 15, 2022 · 4 comments
Open

插入表格,光标移至表格前方,控制台报错 #4376

lcmomo opened this issue Jun 15, 2022 · 4 comments
Labels

Comments

@lcmomo
Copy link

lcmomo commented Jun 15, 2022

bug 描述

插入表格后,将光标移至表格前方位置,控制台报错

你预期的样子是?

插入表格后,光标移至表格前方位置,控制台不报错

系统和浏览器及版本号

  • 操作系统
    macOs Catalina 10.15.7
  • 浏览器和版本
    chrome 102.0.5005.61

wangEditor 版本

V5.1.1

demo 能否复现该 bug ?

在线 demo

请尽量提供在线 demo (推荐以下网站),帮助我们最低成本复现 bug

最小成本的复现步骤

官网demo-默认模式

  • 步骤一
    点击插入表格工具栏,插入m*n 列表格
  • 步骤二
    -移动光标至表格前方位置
  • 步骤三
  • 控制台报错
    Uncaught Error: Cannot resolve a Slate point from DOM point: [object HTMLDivElement],0
    at Object.toSlatePoint (index.js:21651:18333)
    at Object.toSlateRange (index.js:21651:16704)
    at index.js:21651:68674
    at HTMLDocument. (index.js:21651:68783)
    at invokeFunc (index.js:12654:21)
    at leadingEdge (index.js:12664:24)
    at HTMLDocument.debounced (index.js:12729:18)
@wangfupeng1988
Copy link
Collaborator

已在官网 demo 复现,如下图

image

@Nik0601
Copy link

Nik0601 commented Jun 24, 2022

这边也提示如上图重现的bug,具体表现为:
wangEditor.js:21651 Uncaught (in promise) Error: Cannot resolve a DOM node from Slate node: {"text":""}
at Object.toDOMNode (wangEditor.js:21651)
at Object.toDOMPoint (wangEditor.js:21651)
at Object.toDOMRange (wangEditor.js:21651)
at wangEditor.js:21651
at wangEditor.js:21651

请问这个bug该如何修复解决?

@Minglu-Huo
Copy link

开源作者大佬是不是忘记了还有这个问题,很致命🤔

@Yalonexm
Copy link

Yalonexm commented Mar 13, 2024

此问题在编辑时, 双击空行 <p><br></p> 100%复现

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants