slate-react 0.77.3 → 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 +11 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/slate-react.js +13 -3
- package/dist/slate-react.min.js +1 -1
- package/package.json +1 -1
package/dist/slate-react.js
CHANGED
|
@@ -2763,11 +2763,21 @@
|
|
|
2763
2763
|
}
|
|
2764
2764
|
|
|
2765
2765
|
if (event.detail === TRIPLE_CLICK && path.length >= 1) {
|
|
2766
|
-
var
|
|
2766
|
+
var blockPath = path;
|
|
2767
2767
|
|
|
2768
|
-
|
|
2768
|
+
if (!slate.Editor.isBlock(editor, node)) {
|
|
2769
|
+
var _block$;
|
|
2769
2770
|
|
|
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
|
+
}
|
|
2779
|
+
|
|
2780
|
+
var range = slate.Editor.range(editor, blockPath);
|
|
2771
2781
|
slate.Transforms.select(editor, range);
|
|
2772
2782
|
return;
|
|
2773
2783
|
}
|