@nerd-bible/wordgard 0.6.2-beta2 → 0.6.2-beta3
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/editor.js +4 -4
- package/package.json +1 -1
package/dist/editor.js
CHANGED
|
@@ -3912,7 +3912,7 @@ class InputState {
|
|
|
3912
3912
|
return;
|
|
3913
3913
|
if (slice) {
|
|
3914
3914
|
wg.dispatch({
|
|
3915
|
-
changes: { from, to, insert: slice, fit: true },
|
|
3915
|
+
changes: { correct: { from, to, insert: slice, fit: true }, local: true },
|
|
3916
3916
|
selection: isSel ? (cx, changes) => GardSelection.near(cx, changes.mapPos(to, 1), -1) : undefined,
|
|
3917
3917
|
userEvent: "input.paste",
|
|
3918
3918
|
scrollIntoView: isSel
|
|
@@ -4448,10 +4448,10 @@ const baseHandlers = {
|
|
|
4448
4448
|
let dropPos = wg.posAtCoords({ x: event.clientX, y: event.clientY }).pos;
|
|
4449
4449
|
let { draggedContent } = wg.inputState;
|
|
4450
4450
|
let del = draggedContent && dragMovesSelection(wg, event)
|
|
4451
|
-
? { from: draggedContent.from, to: draggedContent.to } : null;
|
|
4452
|
-
if (wg.state.facet(dropHandler).some(f => f(wg, event, dropPos, del, slice)))
|
|
4451
|
+
? { correct: { from: draggedContent.from, to: draggedContent.to }, local: true } : null;
|
|
4452
|
+
if (wg.state.facet(dropHandler).some(f => f(wg, event, dropPos, del ? del.correct : null, slice)))
|
|
4453
4453
|
return true;
|
|
4454
|
-
let ins = { from: dropPos, insert: slice, fit: true };
|
|
4454
|
+
let ins = { correct: { from: dropPos, insert: slice, fit: true }, local: true };
|
|
4455
4455
|
let changes = ChangeSet.create(wg.state.doc, del ? [del, ins] : ins);
|
|
4456
4456
|
wg.focus();
|
|
4457
4457
|
wg.dispatch({
|