@hailin-zheng/editor-core 2.0.32 → 2.0.34

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.
package/index-cjs.js CHANGED
@@ -11161,14 +11161,19 @@ class ElementUtil {
11161
11161
  static getContinueVMergeRenderRows(render, rowIndex, colIndex) {
11162
11162
  const rows = [];
11163
11163
  for (let i = rowIndex + 1; i < render.length; i++) {
11164
- const rowRender = render.getChild(i);
11165
- const rowEle = rowRender.element;
11166
- const ele = rowEle.getChild(colIndex);
11167
- const { vMerge } = ele.props;
11168
- if (vMerge !== 'continue') {
11169
- break;
11164
+ try {
11165
+ const rowRender = render.getChild(i);
11166
+ const rowEle = rowRender.element;
11167
+ const ele = rowEle.getChild(colIndex);
11168
+ const { vMerge } = ele.props;
11169
+ if (vMerge !== 'continue') {
11170
+ break;
11171
+ }
11172
+ rows.push(rowRender);
11173
+ }
11174
+ catch (e) {
11175
+ throw e;
11170
11176
  }
11171
- rows.push(rowRender);
11172
11177
  }
11173
11178
  return rows;
11174
11179
  }
@@ -27268,10 +27273,10 @@ class DocEditor {
27268
27273
  }
27269
27274
  getCursorRect() {
27270
27275
  try {
27271
- if (!this.selectionState.editable) {
27276
+ const { startControl, startOffset } = this.selectionState;
27277
+ if (!this.documentEvent.startHitInfo || (startControl && !startControl.parent)) {
27272
27278
  return { x: 0, y: 0, width: 0, height: 0 };
27273
27279
  }
27274
- const { startControl, startOffset } = this.selectionState;
27275
27280
  const { startRegion, hitDocIndex } = this.documentEvent.startHitInfo;
27276
27281
  const cursorPos = DocumentCursor.getElementCursorPos(startControl, startOffset, startRegion, hitDocIndex);
27277
27282
  return cursorPos.rect;
@@ -27296,6 +27301,7 @@ class DocEditor {
27296
27301
  this.editInput.style.left = pos ? pos.x + 'px' : '-2px';
27297
27302
  this.editInput.style.top = pos ? pos.y + 'px' : '-2px';
27298
27303
  this.editInput.readOnly = true;
27304
+ this.editInput.style.width = "0";
27299
27305
  //this.editInput.style.display = 'none';
27300
27306
  !reset && this.editInput.focus();
27301
27307
  }
@@ -27307,6 +27313,7 @@ class DocEditor {
27307
27313
  this.editInput.style.left = position.x + 'px';
27308
27314
  this.editInput.style.top = position.y + 'px';
27309
27315
  this.editInput.style.height = position.height + 'px';
27316
+ this.editInput.style.width = "1px";
27310
27317
  this.editInput.readOnly = false;
27311
27318
  this.setCursorVisibility(true);
27312
27319
  //this.setCursorInputStatus();
@@ -28299,6 +28306,9 @@ class DocEditor {
28299
28306
  }
28300
28307
  rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
28301
28308
  }
28309
+ version() {
28310
+ return "2.0.34";
28311
+ }
28302
28312
  }
28303
28313
 
28304
28314
  /**