@seafile/sdoc-editor 2.0.164 → 2.0.165

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.
@@ -4,7 +4,7 @@
4
4
  position: absolute;
5
5
  width: 400px;
6
6
  max-width: 400px;
7
- max-height: 350px;
7
+ max-height: 300px;
8
8
  /* The same as hierarchy of comment drawer */
9
9
  z-index: 103;
10
10
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15), 0 4px 8px 3px rgba(0, 0, 0, .15);
@@ -161,9 +161,13 @@ var insertFragmentList = exports.insertFragmentList = function insertFragmentLis
161
161
  }
162
162
  var nodes = fragment;
163
163
  if (isListRoot(fragment[0]) && !isEmptySelection) {
164
- nodes = [{
165
- text: ''
166
- }].concat((0, _toConsumableArray2["default"])(fragment));
164
+ if ((0, _core.isSelectionAtBlockEnd)(editor)) {
165
+ nodes = [(0, _core.generateDefaultText)()].concat((0, _toConsumableArray2["default"])(fragment));
166
+ } else if ((0, _core.isSelectionAtBlockStart)(editor)) {
167
+ nodes = [].concat((0, _toConsumableArray2["default"])(fragment), [(0, _core.generateDefaultText)()]);
168
+ } else {
169
+ nodes = [(0, _core.generateDefaultText)()].concat((0, _toConsumableArray2["default"])(fragment), [(0, _core.generateDefaultText)()]);
170
+ }
167
171
  }
168
172
  return _insertFragment(nodes);
169
173
  }
@@ -64,5 +64,5 @@
64
64
  }
65
65
 
66
66
  .sdoc-file-name-insert-collector {
67
- padding: 0 .25em;
67
+ padding: 0;
68
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "2.0.164",
3
+ "version": "2.0.165",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -71,5 +71,5 @@
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "7c190264fb16c94c25e82ccdf780b7513b6d5fd4"
74
+ "gitHead": "b4ab6e0d30e5ba7de70ab91fe42003c8087d524a"
75
75
  }