Feat:注释掉非https情况下的粘贴逻辑

This commit is contained in:
街角小林 2024-09-20 16:37:07 +08:00
parent b4fdcd81b0
commit 0d465f28f3

View File

@ -163,13 +163,14 @@ class Render {
}) })
} }
// 处理非https下的复制黏贴问题 // 处理非https下的复制黏贴问题
if (!navigator.clipboard) { // 暂时不启用,因为给页面的其他输入框(比如节点文本编辑框)粘贴内容也会触发,冲突问题暂时没有想到好的解决方法,不可能要求所有输入框都阻止冒泡
this.handlePaste = this.handlePaste.bind(this) // if (!navigator.clipboard) {
window.addEventListener('paste', this.handlePaste) // this.handlePaste = this.handlePaste.bind(this)
this.mindMap.on('beforeDestroy', () => { // window.addEventListener('paste', this.handlePaste)
window.removeEventListener('paste', this.handlePaste) // this.mindMap.on('beforeDestroy', () => {
}) // window.removeEventListener('paste', this.handlePaste)
} // })
// }
} }
// 性能模式,懒加载节点 // 性能模式,懒加载节点