Files
notesnook/packages/editor/patches/prosemirror-view+1.33.1.patch
2024-03-21 11:22:48 +05:00

27 lines
1.1 KiB
Diff

diff --git a/node_modules/prosemirror-view/dist/index.cjs b/node_modules/prosemirror-view/dist/index.cjs
index 81a331c..5d6a5fa 100644
--- a/node_modules/prosemirror-view/dist/index.cjs
+++ b/node_modules/prosemirror-view/dist/index.cjs
@@ -3380,7 +3380,7 @@ editHandlers.drop = function (view, _event) {
});
tr.setSelection(selectionBetween(view, $pos, tr.doc.resolve(end)));
}
- view.focus();
+ if (!dragging.nodeView) view.focus();
view.dispatch(tr.setMeta("uiEvent", "drop"));
};
handlers.focus = function (view) {
diff --git a/node_modules/prosemirror-view/dist/index.js b/node_modules/prosemirror-view/dist/index.js
index e076a13..5cd837f 100644
--- a/node_modules/prosemirror-view/dist/index.js
+++ b/node_modules/prosemirror-view/dist/index.js
@@ -3647,7 +3647,7 @@ editHandlers.drop = (view, _event) => {
tr.mapping.maps[tr.mapping.maps.length - 1].forEach((_from, _to, _newFrom, newTo) => end = newTo);
tr.setSelection(selectionBetween(view, $pos, tr.doc.resolve(end)));
}
- view.focus();
+ if (!dragging.nodeView) view.focus();
view.dispatch(tr.setMeta("uiEvent", "drop"));
};
handlers.focus = view => {