@seafile/sdoc-editor 1.0.207 → 1.0.209
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.
|
@@ -340,7 +340,10 @@ function AIModule(_ref) {
|
|
|
340
340
|
const onInsertClick = (0, _react.useCallback)(() => {
|
|
341
341
|
let nextPath = null;
|
|
342
342
|
if (!element) {
|
|
343
|
-
const
|
|
343
|
+
const end = _slate.Range.end(editor.selection);
|
|
344
|
+
const aboveNode = (0, _core.getAboveBlockNode)(editor, {
|
|
345
|
+
at: end
|
|
346
|
+
});
|
|
344
347
|
nextPath = _slate.Path.next(aboveNode[1]);
|
|
345
348
|
} else {
|
|
346
349
|
const path = _slateReact.ReactEditor.findPath(editor, element);
|
|
@@ -382,7 +385,10 @@ function AIModule(_ref) {
|
|
|
382
385
|
editor.insertText(searchResult);
|
|
383
386
|
}
|
|
384
387
|
onCloseClick();
|
|
385
|
-
const
|
|
388
|
+
const end = _slate.Range.end(editor.selection);
|
|
389
|
+
const aboveNode = (0, _core.getAboveBlockNode)(editor, {
|
|
390
|
+
at: end
|
|
391
|
+
});
|
|
386
392
|
focusToEndPath(aboveNode[1]);
|
|
387
393
|
} else {
|
|
388
394
|
const path = _slateReact.ReactEditor.findPath(editor, element);
|
|
@@ -50,6 +50,7 @@ class CheckListItem extends _react.default.PureComponent {
|
|
|
50
50
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
51
51
|
className: "sdoc-checkbox-input-wrapper"
|
|
52
52
|
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
53
|
+
contentEditable: false,
|
|
53
54
|
className: "sdoc-checkbox-input",
|
|
54
55
|
type: "checkbox",
|
|
55
56
|
onChange: this.onChange,
|