@hailin-zheng/editor-core 2.0.31 → 2.0.33
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 +8 -4
- package/index-cjs.js.map +1 -1
- package/index.js +8 -4
- package/index.js.map +1 -1
- package/med_editor/doc-editor.d.ts +1 -0
- package/package.json +1 -1
package/index-cjs.js
CHANGED
@@ -5062,7 +5062,6 @@ class SelectionState {
|
|
5062
5062
|
this.clear();
|
5063
5063
|
}
|
5064
5064
|
clear() {
|
5065
|
-
this.startHitInfo = null;
|
5066
5065
|
this.rangeDirty = true;
|
5067
5066
|
this.range = null;
|
5068
5067
|
this.startOffset = -1;
|
@@ -27269,7 +27268,7 @@ class DocEditor {
|
|
27269
27268
|
}
|
27270
27269
|
getCursorRect() {
|
27271
27270
|
try {
|
27272
|
-
if (!this.
|
27271
|
+
if (!this.documentEvent.startHitInfo) {
|
27273
27272
|
return { x: 0, y: 0, width: 0, height: 0 };
|
27274
27273
|
}
|
27275
27274
|
const { startControl, startOffset } = this.selectionState;
|
@@ -27288,7 +27287,7 @@ class DocEditor {
|
|
27288
27287
|
*/
|
27289
27288
|
setCursorVisibility(visibility) {
|
27290
27289
|
if (visibility) {
|
27291
|
-
this.editInput.style.removeProperty('display');
|
27290
|
+
//this.editInput.style.removeProperty('display');
|
27292
27291
|
this.editInput.focus();
|
27293
27292
|
}
|
27294
27293
|
}
|
@@ -27297,7 +27296,8 @@ class DocEditor {
|
|
27297
27296
|
this.editInput.style.left = pos ? pos.x + 'px' : '-2px';
|
27298
27297
|
this.editInput.style.top = pos ? pos.y + 'px' : '-2px';
|
27299
27298
|
this.editInput.readOnly = true;
|
27300
|
-
this.editInput.style.
|
27299
|
+
this.editInput.style.width = "0";
|
27300
|
+
//this.editInput.style.display = 'none';
|
27301
27301
|
!reset && this.editInput.focus();
|
27302
27302
|
}
|
27303
27303
|
/**
|
@@ -27308,6 +27308,7 @@ class DocEditor {
|
|
27308
27308
|
this.editInput.style.left = position.x + 'px';
|
27309
27309
|
this.editInput.style.top = position.y + 'px';
|
27310
27310
|
this.editInput.style.height = position.height + 'px';
|
27311
|
+
this.editInput.style.width = "1px";
|
27311
27312
|
this.editInput.readOnly = false;
|
27312
27313
|
this.setCursorVisibility(true);
|
27313
27314
|
//this.setCursorInputStatus();
|
@@ -28300,6 +28301,9 @@ class DocEditor {
|
|
28300
28301
|
}
|
28301
28302
|
rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
|
28302
28303
|
}
|
28304
|
+
version() {
|
28305
|
+
return "2.0.33";
|
28306
|
+
}
|
28303
28307
|
}
|
28304
28308
|
|
28305
28309
|
/**
|