slate-react 0.77.2 → 0.77.4-202232614048
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/components/editable.d.ts.map +1 -1
- package/dist/index.es.js +16 -7
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +18 -7
- package/dist/index.js.map +1 -1
- package/dist/slate-react.js +18 -7
- package/dist/slate-react.min.js +1 -1
- package/package.json +1 -1
package/dist/slate-react.js
CHANGED
|
@@ -2397,10 +2397,6 @@
|
|
|
2397
2397
|
_native = false;
|
|
2398
2398
|
}
|
|
2399
2399
|
}
|
|
2400
|
-
}
|
|
2401
|
-
|
|
2402
|
-
if (!_native) {
|
|
2403
|
-
event.preventDefault();
|
|
2404
2400
|
} // COMPAT: For the deleting forward/backward input types we don't want
|
|
2405
2401
|
// to change the selection because it is the range that will be deleted,
|
|
2406
2402
|
// and those commands determine that for themselves.
|
|
@@ -2418,6 +2414,7 @@
|
|
|
2418
2414
|
});
|
|
2419
2415
|
|
|
2420
2416
|
if (!selection || !slate.Range.equals(selection, range)) {
|
|
2417
|
+
_native = false;
|
|
2421
2418
|
var selectionRef = editor.selection && slate.Editor.rangeRef(editor, editor.selection);
|
|
2422
2419
|
slate.Transforms.select(editor, range);
|
|
2423
2420
|
|
|
@@ -2426,6 +2423,10 @@
|
|
|
2426
2423
|
}
|
|
2427
2424
|
}
|
|
2428
2425
|
}
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
if (!_native) {
|
|
2429
|
+
event.preventDefault();
|
|
2429
2430
|
} // COMPAT: If the selection is expanded, even if the command seems like
|
|
2430
2431
|
// a delete forward/backward command it should delete the selection.
|
|
2431
2432
|
|
|
@@ -2762,11 +2763,21 @@
|
|
|
2762
2763
|
}
|
|
2763
2764
|
|
|
2764
2765
|
if (event.detail === TRIPLE_CLICK && path.length >= 1) {
|
|
2765
|
-
var
|
|
2766
|
+
var blockPath = path;
|
|
2766
2767
|
|
|
2767
|
-
|
|
2768
|
+
if (!slate.Editor.isBlock(editor, node)) {
|
|
2769
|
+
var _block$;
|
|
2770
|
+
|
|
2771
|
+
var block = slate.Editor.above(editor, {
|
|
2772
|
+
match: function match(n) {
|
|
2773
|
+
return slate.Editor.isBlock(editor, n);
|
|
2774
|
+
},
|
|
2775
|
+
at: path
|
|
2776
|
+
});
|
|
2777
|
+
blockPath = (_block$ = block === null || block === void 0 ? void 0 : block[1]) !== null && _block$ !== void 0 ? _block$ : path.slice(0, 1);
|
|
2778
|
+
}
|
|
2768
2779
|
|
|
2769
|
-
var range = slate.Editor.range(editor,
|
|
2780
|
+
var range = slate.Editor.range(editor, blockPath);
|
|
2770
2781
|
slate.Transforms.select(editor, range);
|
|
2771
2782
|
return;
|
|
2772
2783
|
}
|