@seafile/sdoc-editor 2.0.131 → 2.0.132

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.
@@ -174,6 +174,15 @@ var GlobalComment = function GlobalComment(_ref) {
174
174
  }
175
175
  }, [commentList, deleteUnseenNotifications]);
176
176
  var commentEditorPlaceholder = !activeCommentGroup ? t('Enter_comment_shift_enter_for_new_line_Enter_to_send') : t('Enter_reply_shift_Enter_for_new_line_Enter_to_send');
177
+ (0, _react.useEffect)(function () {
178
+ if (!contentRef.current) return;
179
+ if (showEditor) {
180
+ // Scroll height 63 = 99 - 36. 99 is spread height and 36.4 is default height of input editor
181
+ contentRef.current.scrollTop += 63;
182
+ } else {
183
+ contentRef.current.scrollTop -= 63;
184
+ }
185
+ }, [showEditor]);
177
186
  return /*#__PURE__*/_react["default"].createElement("div", {
178
187
  className: "sdoc-comment-drawer"
179
188
  }, /*#__PURE__*/_react["default"].createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "2.0.131",
3
+ "version": "2.0.132",
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": "a7ee46a8fd27a2ca4425b788d99985d4213a68cb"
73
+ "gitHead": "7d4ba52369aee54fc7bbd9f59e4eb415411ee113"
74
74
  }