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/index.js
CHANGED
|
@@ -2263,21 +2263,24 @@ var createRestoreDomManager = function createRestoreDomManager(editor, receivedU
|
|
|
2263
2263
|
};
|
|
2264
2264
|
|
|
2265
2265
|
function restoreDOM() {
|
|
2266
|
-
bufferedMutations.
|
|
2267
|
-
|
|
2268
|
-
mutation.
|
|
2269
|
-
|
|
2270
|
-
|
|
2266
|
+
if (bufferedMutations.length > 0) {
|
|
2267
|
+
bufferedMutations.reverse().forEach(function (mutation) {
|
|
2268
|
+
if (mutation.type === 'characterData') {
|
|
2269
|
+
// We don't want to restore the DOM for characterData mutations
|
|
2270
|
+
// because this interrupts the composition.
|
|
2271
|
+
return;
|
|
2272
|
+
}
|
|
2271
2273
|
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2274
|
+
mutation.removedNodes.forEach(function (node) {
|
|
2275
|
+
mutation.target.insertBefore(node, mutation.nextSibling);
|
|
2276
|
+
});
|
|
2277
|
+
mutation.addedNodes.forEach(function (node) {
|
|
2278
|
+
mutation.target.removeChild(node);
|
|
2279
|
+
});
|
|
2280
|
+
}); // Clear buffered mutations to ensure we don't undo them twice
|
|
2279
2281
|
|
|
2280
|
-
|
|
2282
|
+
clear();
|
|
2283
|
+
}
|
|
2281
2284
|
}
|
|
2282
2285
|
|
|
2283
2286
|
return {
|
|
@@ -4341,6 +4344,10 @@ var Editable = function Editable(props) {
|
|
|
4341
4344
|
}
|
|
4342
4345
|
}, [readOnly]),
|
|
4343
4346
|
onInput: React.useCallback(function (event) {
|
|
4347
|
+
if (isEventHandled(event, attributes.onInput)) {
|
|
4348
|
+
return;
|
|
4349
|
+
}
|
|
4350
|
+
|
|
4344
4351
|
if (androidInputManager) {
|
|
4345
4352
|
androidInputManager.handleInput();
|
|
4346
4353
|
return;
|