@seafile/sdoc-editor 2.0.96 → 2.0.97

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.
@@ -29,7 +29,11 @@ var ContextToolbar = function ContextToolbar() {
29
29
  var rect = domRange.getBoundingClientRect();
30
30
  el.style.top = "".concat(rect.top - 42 - 12, "px"); // top = Current top - Element height - Shaded part
31
31
  el.style.left = "".concat(rect.left, "px");
32
- el.style.display = 'block';
32
+ if (rect.top - 42 - 12 > window.innerHeight) {
33
+ el.style.display = 'none';
34
+ } else {
35
+ el.style.display = 'block';
36
+ }
33
37
  // eslint-disable-next-line react-hooks/exhaustive-deps
34
38
  }, []);
35
39
  var onScroll = (0, _react.useCallback)(function (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "2.0.96",
3
+ "version": "2.0.97",
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": "c2ceb9c5be6f89eea943cc6e0fd856b35791191f"
73
+ "gitHead": "e962aebce09ef92484e5fb03ab479ee6233d72b3"
74
74
  }