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/index.js
CHANGED
|
@@ -1487,10 +1487,6 @@ var Editable$1 = function Editable(props) {
|
|
|
1487
1487
|
_native = false;
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
|
-
if (!_native) {
|
|
1493
|
-
event.preventDefault();
|
|
1494
1490
|
} // COMPAT: For the deleting forward/backward input types we don't want
|
|
1495
1491
|
// to change the selection because it is the range that will be deleted,
|
|
1496
1492
|
// and those commands determine that for themselves.
|
|
@@ -1508,6 +1504,7 @@ var Editable$1 = function Editable(props) {
|
|
|
1508
1504
|
});
|
|
1509
1505
|
|
|
1510
1506
|
if (!selection || !slate.Range.equals(selection, range)) {
|
|
1507
|
+
_native = false;
|
|
1511
1508
|
var selectionRef = editor.selection && slate.Editor.rangeRef(editor, editor.selection);
|
|
1512
1509
|
slate.Transforms.select(editor, range);
|
|
1513
1510
|
|
|
@@ -1516,6 +1513,10 @@ var Editable$1 = function Editable(props) {
|
|
|
1516
1513
|
}
|
|
1517
1514
|
}
|
|
1518
1515
|
}
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
if (!_native) {
|
|
1519
|
+
event.preventDefault();
|
|
1519
1520
|
} // COMPAT: If the selection is expanded, even if the command seems like
|
|
1520
1521
|
// a delete forward/backward command it should delete the selection.
|
|
1521
1522
|
|
|
@@ -1852,11 +1853,21 @@ var Editable$1 = function Editable(props) {
|
|
|
1852
1853
|
}
|
|
1853
1854
|
|
|
1854
1855
|
if (event.detail === TRIPLE_CLICK && path.length >= 1) {
|
|
1855
|
-
var
|
|
1856
|
+
var blockPath = path;
|
|
1856
1857
|
|
|
1857
|
-
|
|
1858
|
+
if (!slate.Editor.isBlock(editor, node)) {
|
|
1859
|
+
var _block$;
|
|
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
|
+
}
|
|
1858
1869
|
|
|
1859
|
-
var range = slate.Editor.range(editor,
|
|
1870
|
+
var range = slate.Editor.range(editor, blockPath);
|
|
1860
1871
|
slate.Transforms.select(editor, range);
|
|
1861
1872
|
return;
|
|
1862
1873
|
}
|