quill-image-resize-module icon indicating copy to clipboard operation
quill-image-resize-module copied to clipboard

当编辑器出现滚动条时滚动,拖拽框位置不跟随图片

Open Ron233 opened this issue 4 years ago • 1 comments

bug 描述

当编辑器出现滚动条时发生滚动时,图片拖拽框位置出现错误,没有跟随图片滚动

复现代码

 <div id="editor" style="height:300px">
    <p>Hello World!</p>
    <p>Some initial <strong>bold</strong> text</p>
    <p><br /></p>
  </div>
import Quill from 'quill'
import ImageResize from 'quill-image-resize-module';

Quill.register('modules/imageResize', ImageResize);

// Quill.register('modules/imageResize', ImageResize);
export default {
  mounted() {
    const quill = new Quill('#editor', {
      modules:{
        imageResize:{}
      },

      theme: 'snow',
    })
  },
}

复现步骤

  1. 输入超出文本框高度的文字
  2. 粘贴图片,点击图片,使拖拽框出现 image
  3. 使用鼠标滚动编辑器内容 image

复现环境

Chrome 87.0.4280.88

Ron233 avatar Dec 09 '20 03:12 Ron233

editor?.addEventListener('scroll', () => {
    // reposition or just hide the box
})

okjack365 avatar Apr 11 '23 12:04 okjack365