@seafile/sdoc-editor 2.0.106 → 2.0.107

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.
@@ -77,30 +77,6 @@ var WikiEditor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
77
77
  };
78
78
  // eslint-disable-next-line react-hooks/exhaustive-deps
79
79
  }, []);
80
-
81
- // useMount: focus editor
82
- (0, _react.useEffect)(function () {
83
- var timer = setTimeout(function () {
84
- var _validEditor$children = (0, _slicedToArray2["default"])(validEditor.children, 1),
85
- firstNode = _validEditor$children[0];
86
- if (firstNode) {
87
- var _firstNode$children = (0, _slicedToArray2["default"])(firstNode.children, 1),
88
- firstNodeFirstChild = _firstNode$children[0];
89
- if (firstNodeFirstChild) {
90
- var endOfFirstNode = _slate.Editor.end(validEditor, [0, 0]);
91
- var range = {
92
- anchor: endOfFirstNode,
93
- focus: endOfFirstNode
94
- };
95
- (0, _core.focusEditor)(validEditor, range);
96
- }
97
- }
98
- }, 300);
99
- return function () {
100
- clearTimeout(timer);
101
- };
102
- // eslint-disable-next-line react-hooks/exhaustive-deps
103
- }, []);
104
80
  (0, _react.useEffect)(function () {
105
81
  if (scrollRef) {
106
82
  scrollRef.current.id = 'sdoc-scroll-container';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "2.0.106",
3
+ "version": "2.0.107",
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": "ab69056e2bef0d68a5c20676553d642b61a0f4bf"
73
+ "gitHead": "76d3cdfdbc4a22923af493d58eeca2c2546108e0"
74
74
  }