@ones-editor/editor 2.1.1-beta.76 → 2.1.1-beta.77

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/dist/index.js CHANGED
@@ -8934,11 +8934,12 @@ var __publicField = (obj, key, value) => {
8934
8934
  return mouseEvent;
8935
8935
  }
8936
8936
  function ensureIsMobileEvent(events2) {
8937
- return events2 instanceof TouchEvent;
8937
+ return events2.type.startsWith("touch");
8938
8938
  }
8939
- function bindDbClick(elem, handler) {
8939
+ function bindDbClick(editor, elem, handler) {
8940
8940
  let clickCount = 0;
8941
8941
  function simulateDoubleClick(event) {
8942
+ editor.focus();
8942
8943
  clickCount++;
8943
8944
  if (clickCount === 1) {
8944
8945
  setTimeout(() => {
@@ -8964,7 +8965,7 @@ var __publicField = (obj, key, value) => {
8964
8965
  topWindow = window.top;
8965
8966
  }
8966
8967
  const visualViewportHeight = (_b = (_a = topWindow.visualViewport) == null ? void 0 : _a.height) != null ? _b : topWindow.innerHeight || topWindow.document.documentElement.clientHeight;
8967
- return Math.max(topWindow.innerHeight - visualViewportHeight, 40);
8968
+ return Math.max(topWindow.innerHeight - visualViewportHeight + 40, 40);
8968
8969
  };
8969
8970
  class ScrollDomElement {
8970
8971
  constructor(element) {
@@ -11344,7 +11345,7 @@ var __publicField = (obj, key, value) => {
11344
11345
  container.onmousedown = this.handleMouseDown;
11345
11346
  }
11346
11347
  if (clientType.isIOS) {
11347
- this.dbClickRef = bindDbClick(container, this.handleDblClick);
11348
+ this.dbClickRef = bindDbClick(this.editor, container, this.handleDblClick);
11348
11349
  } else {
11349
11350
  container.ondblclick = this.handleDblClick;
11350
11351
  }
@@ -49782,7 +49783,7 @@ ${codeText}
49782
49783
  __publicField(this, "onShow", () => {
49783
49784
  setTimeout(() => {
49784
49785
  var _a;
49785
- (_a = this.form.linkText) == null ? void 0 : _a.getField().focus();
49786
+ (_a = this.form.linkUrl) == null ? void 0 : _a.getField().focus();
49786
49787
  }, 400);
49787
49788
  });
49788
49789
  __publicField(this, "showPopup", (options) => {
@@ -78467,6 +78468,8 @@ ${content}
78467
78468
  __publicField(this, "createMobileCommandItem", (items) => {
78468
78469
  const mobileWrap = this.getMobileCommandElement();
78469
78470
  const content = mobileWrap.querySelector(".mobile-item-content");
78471
+ const input2 = mobileWrap.querySelector("input");
78472
+ input2.value = "";
78470
78473
  this.createMobileItems(content, items, "");
78471
78474
  setTimeout(() => {
78472
78475
  const clientHeight = this.editor.scrollContainer.clientHeight;
@@ -86716,7 +86719,7 @@ ${data2.flowchartText}
86716
86719
  }
86717
86720
  }
86718
86721
  });
86719
- editor.version = "2.1.1-beta.76";
86722
+ editor.version = "2.1.1-beta.77";
86720
86723
  if (Logger$2.level === LogLevel.DEBUG) {
86721
86724
  window.setReauthFail = (fail) => {
86722
86725
  window.isReauthError = fail;
@@ -86817,7 +86820,7 @@ ${data2.flowchartText}
86817
86820
  });
86818
86821
  editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
86819
86822
  OnesEditorToolbar.register(editor);
86820
- editor.version = "2.1.1-beta.76";
86823
+ editor.version = "2.1.1-beta.77";
86821
86824
  return editor;
86822
86825
  }
86823
86826
  async function showDocVersions(editor, options, serverUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "2.1.1-beta.76",
3
+ "version": "2.1.1-beta.77",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",