wangEditor icon indicating copy to clipboard operation
wangEditor copied to clipboard

内容包含 换行 时候setHtml bug

Open fancyhejianyang opened this issue 1 year ago • 2 comments

bug 描述

场景为:多个编辑文本切换 显示在编辑器上,一旦内容包含换行时 切换会报错

你预期的样子是?

正常切换 setHTML

系统和浏览器及版本号

  • win10
  • Chrome 105.0.5195.127

wangEditor 版本

Editor :最新版或者V5

demo 能否复现该 bug ?

在线 demo

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

  • https://js-ju99up.stackblitz.io//
  • https://stackblitz.com/edit/js-ju99up?file=index.js (代码版)

最小成本的复现步骤

  • 步骤一 随便输入内容abc,保存
  • 步骤二 随便输入内容 def + 含换行 保存
  • 步骤三 随便输入内容ghi + 换行, 保存 (此时有temp1 temp2 temp3)
  • 步骤四 点击temp3 鼠标点击内容至换行处
  • 步骤五 点击temp2 (能够正常切换html 内容 “def ...”)
  • 步骤六 点击temp1 (html没更新,控制台有报错)可多次切换 temp1 2 3 穿插focus状态

fancyhejianyang avatar Sep 21 '22 02:09 fancyhejianyang

1663728916790

fancyhejianyang avatar Sep 21 '22 02:09 fancyhejianyang

根据你的步骤操作,没复现这个 bug 呀。如下图

image

wangfupeng1988 avatar Sep 21 '22 05:09 wangfupeng1988

https://user-images.githubusercontent.com/17957478/191941474-82ed0fb8-07af-4cec-ba48-bf5b0b547447.mp4 @wangfupeng1988

fancyhejianyang avatar Sep 23 '22 10:09 fancyhejianyang