slate-react 0.72.4 → 0.72.5-202201915129
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/CHANGELOG.md +6 -0
- package/dist/components/editable.d.ts.map +1 -1
- package/dist/components/slate.d.ts.map +1 -1
- package/dist/index.es.js +5 -11
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +3 -13
- package/dist/index.js.map +1 -1
- package/dist/slate-react.js +3 -13
- package/dist/slate-react.min.js +1 -1
- package/package.json +1 -1
package/dist/slate-react.js
CHANGED
|
@@ -2220,7 +2220,7 @@
|
|
|
2220
2220
|
|
|
2221
2221
|
|
|
2222
2222
|
state.isUpdatingSelection = true;
|
|
2223
|
-
var newDomRange = selection && ReactEditor.toDOMRange(editor, selection);
|
|
2223
|
+
var newDomRange = selection && hasDomSelectionInEditor && ReactEditor.toDOMRange(editor, selection);
|
|
2224
2224
|
|
|
2225
2225
|
if (newDomRange) {
|
|
2226
2226
|
if (slate.Range.isBackward(selection)) {
|
|
@@ -5097,20 +5097,10 @@
|
|
|
5097
5097
|
};
|
|
5098
5098
|
|
|
5099
5099
|
document.addEventListener('focus', fn, true);
|
|
5100
|
-
return function () {
|
|
5101
|
-
return document.removeEventListener('focus', fn, true);
|
|
5102
|
-
};
|
|
5103
|
-
}, []);
|
|
5104
|
-
useIsomorphicLayoutEffect(function () {
|
|
5105
|
-
var fn = function fn() {
|
|
5106
|
-
setTimeout(function () {
|
|
5107
|
-
setIsFocused(ReactEditor.isFocused(editor));
|
|
5108
|
-
}, 0);
|
|
5109
|
-
};
|
|
5110
|
-
|
|
5111
5100
|
document.addEventListener('blur', fn, true);
|
|
5112
5101
|
return function () {
|
|
5113
|
-
|
|
5102
|
+
document.removeEventListener('focus', fn, true);
|
|
5103
|
+
document.removeEventListener('blur', fn, true);
|
|
5114
5104
|
};
|
|
5115
5105
|
}, []);
|
|
5116
5106
|
return /*#__PURE__*/React__default['default'].createElement(SlateContext.Provider, {
|