@tiptap/core 2.0.0-beta.217 → 2.0.0-beta.218
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +5 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/packages/core/src/pasteRules/nodePasteRule.d.ts +2 -2
- package/package.json +2 -2
- package/src/NodeView.ts +10 -2
- package/src/pasteRules/nodePasteRule.ts +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -3964,10 +3964,11 @@ img.ProseMirror-separator {
|
|
|
3964
3964
|
if (!isInElement) {
|
|
3965
3965
|
return false;
|
|
3966
3966
|
}
|
|
3967
|
+
const isDragEvent = event.type.startsWith('drag');
|
|
3967
3968
|
const isDropEvent = event.type === 'drop';
|
|
3968
3969
|
const isInput = ['INPUT', 'BUTTON', 'SELECT', 'TEXTAREA'].includes(target.tagName) || target.isContentEditable;
|
|
3969
3970
|
// any input event within node views should be ignored by ProseMirror
|
|
3970
|
-
if (isInput && !isDropEvent) {
|
|
3971
|
+
if (isInput && !isDropEvent && !isDragEvent) {
|
|
3971
3972
|
return true;
|
|
3972
3973
|
}
|
|
3973
3974
|
const { isEditable } = this.editor;
|
|
@@ -3978,7 +3979,6 @@ img.ProseMirror-separator {
|
|
|
3978
3979
|
const isPasteEvent = event.type === 'paste';
|
|
3979
3980
|
const isCutEvent = event.type === 'cut';
|
|
3980
3981
|
const isClickEvent = event.type === 'mousedown';
|
|
3981
|
-
const isDragEvent = event.type.startsWith('drag');
|
|
3982
3982
|
// ProseMirror tries to drag selectable nodes
|
|
3983
3983
|
// even if `draggable` is set to `false`
|
|
3984
3984
|
// this fix prevents that
|
|
@@ -3998,6 +3998,9 @@ img.ProseMirror-separator {
|
|
|
3998
3998
|
document.addEventListener('dragend', () => {
|
|
3999
3999
|
this.isDragging = false;
|
|
4000
4000
|
}, { once: true });
|
|
4001
|
+
document.addEventListener('drop', () => {
|
|
4002
|
+
this.isDragging = false;
|
|
4003
|
+
}, { once: true });
|
|
4001
4004
|
document.addEventListener('mouseup', () => {
|
|
4002
4005
|
this.isDragging = false;
|
|
4003
4006
|
}, { once: true });
|