mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-15 02:59:01 +08:00
check for copy and cut event
This commit is contained in:
parent
7c7d2c6e19
commit
a1ae06320a
@ -141,10 +141,12 @@ export default class ComponentView {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isCopy = event.type === 'copy'
|
||||||
const isPaste = event.type === 'paste'
|
const isPaste = event.type === 'paste'
|
||||||
|
const isCut = event.type === 'cut'
|
||||||
const isDrag = event.type.startsWith('drag') || event.type === 'drop'
|
const isDrag = event.type.startsWith('drag') || event.type === 'drop'
|
||||||
|
|
||||||
if ((draggable && isDrag) || isPaste) {
|
if ((draggable && isDrag) || isCopy || isPaste || isCut) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user