@kaitify/vue 0.0.1-beta.26 → 0.0.1-beta.28

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.
@@ -36713,7 +36713,7 @@ class Editor {
36713
36713
  * 如果编辑器内有滚动条,滚动编辑器到光标可视范围
36714
36714
  */
36715
36715
  scrollViewToSelection() {
36716
- if (this.selection.focused()) {
36716
+ if (this.selection.focused() && this.isEditable()) {
36717
36717
  const focusDom = this.findDom(this.selection.end.node);
36718
36718
  const scrollFunction = async (scrollEl) => {
36719
36719
  const scrollHeight = element.getScrollHeight(scrollEl);
@@ -37865,6 +37865,9 @@ class Editor {
37865
37865
  * 根据selection更新编辑器真实光标
37866
37866
  */
37867
37867
  async updateRealSelection() {
37868
+ if (!this.isEditable()) {
37869
+ return;
37870
+ }
37868
37871
  const realSelection = window.getSelection();
37869
37872
  if (!realSelection) {
37870
37873
  return;
@@ -37901,7 +37904,9 @@ class Editor {
37901
37904
  }
37902
37905
  }
37903
37906
  /**
37904
- * 重新渲染编辑器视图,不会触发onChange
37907
+ * 重新渲染编辑器视图
37908
+ * 1. 不会触发onChange事件;
37909
+ * 2. 不会渲染真实光标
37905
37910
  */
37906
37911
  async review(value) {
37907
37912
  if (typeof this.beforeUpdateView == "function") this.beforeUpdateView.apply(this);