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/index.js
CHANGED
|
@@ -1853,11 +1853,21 @@ var Editable$1 = function Editable(props) {
|
|
|
1853
1853
|
}
|
|
1854
1854
|
|
|
1855
1855
|
if (event.detail === TRIPLE_CLICK && path.length >= 1) {
|
|
1856
|
-
var
|
|
1856
|
+
var blockPath = path;
|
|
1857
1857
|
|
|
1858
|
-
|
|
1858
|
+
if (!slate.Editor.isBlock(editor, node)) {
|
|
1859
|
+
var _block$;
|
|
1859
1860
|
|
|
1860
|
-
|
|
1861
|
+
var block = slate.Editor.above(editor, {
|
|
1862
|
+
match: function match(n) {
|
|
1863
|
+
return slate.Editor.isBlock(editor, n);
|
|
1864
|
+
},
|
|
1865
|
+
at: path
|
|
1866
|
+
});
|
|
1867
|
+
blockPath = (_block$ = block === null || block === void 0 ? void 0 : block[1]) !== null && _block$ !== void 0 ? _block$ : path.slice(0, 1);
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
var range = slate.Editor.range(editor, blockPath);
|
|
1861
1871
|
slate.Transforms.select(editor, range);
|
|
1862
1872
|
return;
|
|
1863
1873
|
}
|