mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 04:00:59 +01:00
editor: do not open keyboard on task item drop
This commit is contained in:
26
packages/editor/patches/prosemirror-view+1.31.8.patch
Normal file
26
packages/editor/patches/prosemirror-view+1.31.8.patch
Normal 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 => {
|
||||
Reference in New Issue
Block a user