editor: do not open keyboard on task item drop

This commit is contained in:
Abdullah Atta
2023-10-02 16:22:20 +05:00
parent ab3f5f6a6c
commit 3efdd9505e

View File

@@ -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 => {