quill-image-resize-module
quill-image-resize-module copied to clipboard
当编辑器出现滚动条时滚动,拖拽框位置不跟随图片
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',
})
},
}
复现步骤
- 输入超出文本框高度的文字
- 粘贴图片,点击图片,使拖拽框出现
- 使用鼠标滚动编辑器内容
复现环境
Chrome 87.0.4280.88
editor?.addEventListener('scroll', () => {
// reposition or just hide the box
})