Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

editor: do not open keyboard on task item drop

Abdullah Atta3efdd9505e6a
diff --git a/packages/editor/patches/prosemirror-view+1.31.8.patch b/packages/editor/patches/prosemirror-view+1.31.8.patch
new file mode 100644
index 000000000..a63e2f874
--- /dev/null
+++ b/packages/editor/patches/prosemirror-view+1.31.8.patch
@@ -0,0 +1,26 @@
+diff --git a/node_modules/prosemirror-view/dist/index.cjs b/node_modules/prosemirror-view/dist/index.cjs
+index 5eb3ebd..8522fe1 100644
+--- a/node_modules/prosemirror-view/dist/index.cjs
++++ b/node_modules/prosemirror-view/dist/index.cjs
+@@ -4088,7 +4088,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"));
+ };
+
+diff --git a/node_modules/prosemirror-view/dist/index.js b/node_modules/prosemirror-view/dist/index.js
+index 08d5b69..463be31 100644
+--- a/node_modules/prosemirror-view/dist/index.js
++++ b/node_modules/prosemirror-view/dist/index.js
+@@ -3617,7 +3617,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 => {