wujie icon indicating copy to clipboard operation
wujie copied to clipboard

IOS中使用braft-editor编辑器报错:InvalidStateError: extend() requires a Range to be added to the Selection

Open mafx1024 opened this issue 1 year ago • 1 comments

描述bug 初始化加载是正常的,当输入文字的时候报错:InvalidStateError: extend() requires a Range to be added to the Selection 只有在 IOS 的 safari 浏览器中有这个问题

如何复现

  1. 加载编辑器
  2. 输入文字
  3. 报错

错误截图 image

最小复现仓库或者地址 暂无

mafx1024 avatar Mar 21 '24 11:03 mafx1024

我尝试注释了 image 页面是没有报错了,但是对于编辑的输入相关的动作是有影响的。

mafx1024 avatar Mar 21 '24 12:03 mafx1024

问题原因:根本原因是 safari浏览器不支持 shadowDOM.getSelection, 解决方案:在 safari 环境中主动降级

mafx1024 avatar Apr 23 '24 09:04 mafx1024

我也遇到这个问题了,大哥你解决了吗

homestylew avatar Oct 15 '24 13:10 homestylew