slate-react 0.91.5 → 0.91.6
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/components/restore-dom/restore-dom-manager.d.ts.map +1 -1
- package/dist/index.es.js +20 -13
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +20 -13
- package/dist/index.js.map +1 -1
- package/dist/slate-react.js +20 -13
- package/dist/slate-react.min.js +1 -1
- package/package.json +1 -1
package/dist/slate-react.js
CHANGED
|
@@ -3671,21 +3671,24 @@
|
|
|
3671
3671
|
};
|
|
3672
3672
|
|
|
3673
3673
|
function restoreDOM() {
|
|
3674
|
-
bufferedMutations.
|
|
3675
|
-
|
|
3676
|
-
mutation.
|
|
3677
|
-
|
|
3678
|
-
|
|
3674
|
+
if (bufferedMutations.length > 0) {
|
|
3675
|
+
bufferedMutations.reverse().forEach(function (mutation) {
|
|
3676
|
+
if (mutation.type === 'characterData') {
|
|
3677
|
+
// We don't want to restore the DOM for characterData mutations
|
|
3678
|
+
// because this interrupts the composition.
|
|
3679
|
+
return;
|
|
3680
|
+
}
|
|
3679
3681
|
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3682
|
+
mutation.removedNodes.forEach(function (node) {
|
|
3683
|
+
mutation.target.insertBefore(node, mutation.nextSibling);
|
|
3684
|
+
});
|
|
3685
|
+
mutation.addedNodes.forEach(function (node) {
|
|
3686
|
+
mutation.target.removeChild(node);
|
|
3687
|
+
});
|
|
3688
|
+
}); // Clear buffered mutations to ensure we don't undo them twice
|
|
3687
3689
|
|
|
3688
|
-
|
|
3690
|
+
clear();
|
|
3691
|
+
}
|
|
3689
3692
|
}
|
|
3690
3693
|
|
|
3691
3694
|
return {
|
|
@@ -5749,6 +5752,10 @@
|
|
|
5749
5752
|
}
|
|
5750
5753
|
}, [readOnly]),
|
|
5751
5754
|
onInput: React.useCallback(function (event) {
|
|
5755
|
+
if (isEventHandled(event, attributes.onInput)) {
|
|
5756
|
+
return;
|
|
5757
|
+
}
|
|
5758
|
+
|
|
5752
5759
|
if (androidInputManager) {
|
|
5753
5760
|
androidInputManager.handleInput();
|
|
5754
5761
|
return;
|