@seafile/sdoc-editor 2.0.124 → 2.0.126
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.
|
@@ -72,6 +72,10 @@ var EditableArticle = function EditableArticle(_ref) {
|
|
|
72
72
|
scrollTop = _scrollRef$current.scrollTop,
|
|
73
73
|
clientHeight = _scrollRef$current.clientHeight;
|
|
74
74
|
eventProxy.onKeyDown(event);
|
|
75
|
+
var selection = editor.selection;
|
|
76
|
+
if (!_slate.Range.isCollapsed(selection)) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
75
79
|
if (event.key === 'ArrowLeft') {
|
|
76
80
|
event.preventDefault();
|
|
77
81
|
_slate.Transforms.move(editor, {
|
|
@@ -205,7 +209,7 @@ var EditableArticle = function EditableArticle(_ref) {
|
|
|
205
209
|
}
|
|
206
210
|
|
|
207
211
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
208
|
-
}, [scrollRef]);
|
|
212
|
+
}, [scrollRef, editor]);
|
|
209
213
|
var handleScrollIntoView = (0, _react.useCallback)(function (editor, domRange) {
|
|
210
214
|
try {
|
|
211
215
|
var selection = editor.selection;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.126",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "7af77d5a5fda5e6aaa76145cf4547f5bc66cb4b1"
|
|
74
74
|
}
|