@taocompany/magic-grid 0.10.3 → 0.10.4

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.es.js CHANGED
@@ -2952,9 +2952,9 @@ var rs = class {
2952
2952
  } else e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey && this.onEditingInput?.();
2953
2953
  };
2954
2954
  handleEditorFocusOut = (e) => {
2955
- let t = e;
2955
+ let t = e, n = this.editing;
2956
2956
  requestAnimationFrame(() => {
2957
- this.isEditing() && this.phase !== "committing" && (this.isFocusWithinEditorSurface(t) || (this.clearPendingBlurCommit(), this.scheduleBlurCommitAfterClick()));
2957
+ this.isEditing() && this.editing === n && this.phase !== "committing" && (this.isFocusWithinEditorSurface(t) || (this.clearPendingBlurCommit(), this.scheduleBlurCommitAfterClick()));
2958
2958
  });
2959
2959
  };
2960
2960
  constructor(e) {
@@ -3320,9 +3320,9 @@ var Cs = class {
3320
3320
  e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), this.stopRowEditing(!1));
3321
3321
  };
3322
3322
  handleEditorBlur = (e) => {
3323
- let t = e;
3323
+ let t = e, n = this.editing;
3324
3324
  requestAnimationFrame(() => {
3325
- this.isEditing() && this.phase !== "committing" && (this.isFocusWithinRowEditors(t.relatedTarget) || (this.clearPendingBlurCommit(), this.scheduleBlurCommitAfterClick()));
3325
+ this.isEditing() && this.editing === n && this.phase !== "committing" && (this.isFocusWithinRowEditors(t.relatedTarget) || (this.clearPendingBlurCommit(), this.scheduleBlurCommitAfterClick()));
3326
3326
  });
3327
3327
  };
3328
3328
  constructor(e) {
@@ -15912,7 +15912,12 @@ function Zx(e, t) {
15912
15912
  $x(e, t);
15913
15913
  }
15914
15914
  function Qx(e, t) {
15915
- if (e.deps.rowEditingService.isCommitting()) return;
15915
+ if (e.deps.rowEditingService.isCommitting()) {
15916
+ e.deps.rowEditingService.awaitCommitIdle().then(() => {
15917
+ e.deps.rowEditingService.isCommitting() || Qx(e, t);
15918
+ });
15919
+ return;
15920
+ }
15916
15921
  if (e.deps.editingService.isEditing()) {
15917
15922
  e.deps.editingService.stopEditing(!0).then(() => {
15918
15923
  e.deps.editingService.isEditing() || Qx(e, t);
@@ -15998,6 +16003,12 @@ function Qx(e, t) {
15998
16003
  }
15999
16004
  function $x(e, t) {
16000
16005
  if (e.deps.rowEditingService.isCommitting()) return;
16006
+ if (e.deps.editingService.isCommitting()) {
16007
+ e.deps.editingService.awaitCommitIdle().then(() => {
16008
+ e.deps.editingService.isCommitting() || $x(e, t);
16009
+ });
16010
+ return;
16011
+ }
16001
16012
  if (e.deps.rowEditingService.isEditing()) {
16002
16013
  e.deps.rowEditingService.stopRowEditing(!0).then((n) => {
16003
16014
  n?.committed && !e.deps.rowEditingService.isEditing() && $x(e, t);
@@ -20338,12 +20349,15 @@ var ST = class {
20338
20349
  }
20339
20350
  }, CT = class {
20340
20351
  ctx;
20352
+ pendingSingleClickGesture = null;
20353
+ clearPendingSingleClickGesture = null;
20354
+ consumedPointerUpCellAction = null;
20341
20355
  constructor(e) {
20342
20356
  this.ctx = e;
20343
20357
  }
20344
20358
  handleCellMouseDown = async (e) => {
20345
20359
  if (e.button !== 0) return;
20346
- if (e.target instanceof Element && e.target.closest(".mg-range-handle")) {
20360
+ if (this.clearPendingSingleClickGesture?.(), this.clearPendingSingleClickGesture = null, this.pendingSingleClickGesture = null, this.consumedPointerUpCellAction = null, e.target instanceof Element && e.target.closest(".mg-range-handle")) {
20347
20361
  if (e.preventDefault(), e.stopPropagation(), this.ctx.deps.isCommitting() && await this.ctx.deps.awaitCommitIdle(), this.ctx.deps.isEditing() && (await this.ctx.deps.commitEditing(), this.ctx.deps.isEditing())) return;
20348
20362
  this.ctx.rangeHandleSession.begin(e.clientX, e.clientY);
20349
20363
  return;
@@ -20366,7 +20380,7 @@ var ST = class {
20366
20380
  colId: t.colId,
20367
20381
  rowIndex: t.rowIndex,
20368
20382
  colIndex: this.ctx.host.getColIndex(t.colId)
20369
- }), this.ctx.deps.viewportEl.focus();
20383
+ }), this.ctx.deps.viewportEl.focus({ preventScroll: !0 });
20370
20384
  return;
20371
20385
  }
20372
20386
  if (e.target instanceof Element && e.target.closest(".mg-column-settings-menu")) {
@@ -20379,7 +20393,7 @@ var ST = class {
20379
20393
  colId: t.colId,
20380
20394
  rowIndex: t.rowIndex,
20381
20395
  colIndex: this.ctx.host.getColIndex(t.colId)
20382
- }), this.ctx.deps.viewportEl.focus();
20396
+ }), this.ctx.deps.viewportEl.focus({ preventScroll: !0 });
20383
20397
  return;
20384
20398
  }
20385
20399
  if (t && this.ctx.rowResizeSession.canStart(t.colId, e.target, this.ctx.indexSelectionDragSession.isActive() || this.ctx.rowDragSession.isActive())) {
@@ -20416,60 +20430,43 @@ var ST = class {
20416
20430
  });
20417
20431
  return;
20418
20432
  }
20419
- if (t && this.ctx.deps.isCellSelectionEnabled?.() && !As(this.ctx.deps.editBehavior) && !await this.commitEditingForCellRangeInteraction(t, e)) return;
20420
- if (t && this.ctx.cellRangeDragSession.canStart(t, e, "replace")) {
20421
- e.preventDefault(), this.ctx.host.clearIndexFocusIfNeeded(t.colId), this.emitCellClicked(t), this.ctx.cellRangeDragSession.begin({
20422
- anchorRowId: t.rowId,
20423
- anchorColId: t.colId,
20424
- anchorRowIndex: t.rowIndex,
20425
- clientX: e.clientX,
20426
- clientY: e.clientY,
20427
- mode: "replace"
20428
- });
20429
- return;
20430
- }
20431
- if (t && this.ctx.cellRangeDragSession.canStart(t, e, "append")) {
20432
- e.preventDefault(), this.ctx.host.clearIndexFocusIfNeeded(t.colId), this.emitCellClicked(t), this.ctx.cellRangeDragSession.begin({
20433
- anchorRowId: t.rowId,
20434
- anchorColId: t.colId,
20435
- anchorRowIndex: t.rowIndex,
20436
- clientX: e.clientX,
20437
- clientY: e.clientY,
20438
- mode: "append"
20439
- });
20440
- return;
20441
- }
20433
+ let r = !1;
20434
+ if (t && this.ctx.deps.isCellSelectionEnabled?.() && !As(this.ctx.deps.editBehavior) && this.ctx.deps.isEditing() && (!this.isSameEditingTarget(t) && this.shouldSchedulePointerUpWhileEditingSwitch(t, e) && (this.scheduleSingleClickEditingAfterPointerDown(t), r = !0), !await this.commitEditingForCellRangeInteraction(t, e)) || t && this.tryBeginCellRangeDragFromMouseDown(t, e, "replace", r) || t && this.tryBeginCellRangeDragFromMouseDown(t, e, "append", r)) return;
20442
20435
  if (t && this.ctx.cellRangeInteraction.tryHandleModifierMouseDown(t, e)) {
20443
20436
  this.emitCellClicked(t), this.ctx.host.clearIndexFocusIfNeeded(t.colId), this.ctx.host.setFocusedCell({
20444
20437
  rowId: t.rowId,
20445
20438
  colId: t.colId,
20446
20439
  rowIndex: t.rowIndex,
20447
20440
  colIndex: this.ctx.host.getColIndex(t.colId)
20448
- }), this.ctx.deps.viewportEl.focus();
20441
+ }), this.ctx.deps.viewportEl.focus({ preventScroll: !0 });
20449
20442
  return;
20450
20443
  }
20451
- if (this.ctx.deps.isCommitting() && (e.preventDefault(), await this.ctx.deps.awaitCommitIdle()), this.ctx.deps.isEditing() && mo(e.target)) return;
20452
- let r = Gb(this.ctx.deps.rowModel, e.target);
20453
- if (this.ctx.deps.isEditing() && (r && this.isSameEditingTarget(r) || (await this.ctx.deps.commitEditing(), this.ctx.deps.isEditing()))) return;
20454
- if (!r) {
20444
+ this.ctx.deps.isCommitting() && (e.preventDefault(), await this.ctx.deps.awaitCommitIdle());
20445
+ let i = Gb(this.ctx.deps.rowModel, e.target);
20446
+ if (this.ctx.deps.isEditing()) {
20447
+ let t = i, n = this.resolveCellTargetUnderPointer(e);
20448
+ if (t && !this.isSameEditingTarget(t) ? i = t : n && (i = n), i && this.isSameEditingTarget(i) && mo(e.target) || mo(e.target) && !i) return;
20449
+ }
20450
+ if (this.ctx.deps.isEditing() && (i && this.isSameEditingTarget(i) || (i && (this.scheduleSingleClickEditingAfterPointerDown(i), r = !0), await this.ctx.deps.commitEditing(), this.ctx.deps.isEditing()))) return;
20451
+ if (!i) {
20455
20452
  this.ctx.host.clearIndexFocusState(), this.ctx.cellRangeInteraction.tryClearOnBlankViewportClick();
20456
20453
  return;
20457
20454
  }
20458
- let { rowId: i, colId: a, rowIndex: o } = r;
20459
- (this.ctx.host.isExpandColumnEntry(a) || this.ctx.host.isGroupColumnEntry(a) || this.ctx.host.isTreeColumnEntry(a) || this.ctx.host.isSelectionColumnEntry(a) || e.shiftKey || e.ctrlKey || e.metaKey) && e.preventDefault(), this.emitCellClicked(r), this.ctx.host.isIndexColumnEntry(a) ? this.ctx.host.applyIndexFocus(i, o, a, {
20455
+ let { rowId: a, colId: o, rowIndex: s } = i;
20456
+ (this.ctx.host.isExpandColumnEntry(o) || this.ctx.host.isGroupColumnEntry(o) || this.ctx.host.isTreeColumnEntry(o) || this.ctx.host.isSelectionColumnEntry(o) || e.shiftKey || e.ctrlKey || e.metaKey) && e.preventDefault(), this.emitCellClicked(i), this.ctx.host.isIndexColumnEntry(o) ? this.ctx.host.applyIndexFocus(a, s, o, {
20460
20457
  ctrlKey: e.ctrlKey || e.metaKey,
20461
20458
  shiftKey: e.shiftKey,
20462
20459
  toggleOnReselect: !0
20463
- }) : (this.ctx.host.clearIndexFocusIfNeeded(a), this.ctx.host.isExpandColumnEntry(a) ? this.ctx.host.applyRowExpansionToggle(i, o, a) : this.ctx.host.isSelectionColumnEntry(a) && this.ctx.host.applyRowSelection(i, o, a, {
20460
+ }) : (this.ctx.host.clearIndexFocusIfNeeded(o), this.ctx.host.isExpandColumnEntry(o) ? this.ctx.host.applyRowExpansionToggle(a, s, o) : this.ctx.host.isSelectionColumnEntry(o) && this.ctx.host.applyRowSelection(a, s, o, {
20464
20461
  ctrlKey: e.ctrlKey || e.metaKey,
20465
20462
  shiftKey: e.shiftKey,
20466
20463
  toggleOnReselect: !0
20467
20464
  })), this.ctx.host.setFocusedCell({
20468
- rowId: i,
20469
- colId: a,
20470
- rowIndex: o,
20471
- colIndex: this.ctx.host.getColIndex(a)
20472
- }), this.ctx.deps.viewportEl.focus();
20465
+ rowId: a,
20466
+ colId: o,
20467
+ rowIndex: s,
20468
+ colIndex: this.ctx.host.getColIndex(o)
20469
+ }), this.ctx.deps.viewportEl.focus({ preventScroll: !0 }), !r && this.isOverlaySingleClickEditableColumn(i) && this.scheduleSingleClickEditingAfterPointerDown(i);
20473
20470
  };
20474
20471
  handleCellClick = async (e) => {
20475
20472
  if (e.button !== 0 || (this.ctx.deps.isCommitting() && (e.preventDefault(), await this.ctx.deps.awaitCommitIdle()), e.ctrlKey || e.metaKey || e.shiftKey)) return;
@@ -20478,26 +20475,13 @@ var ST = class {
20478
20475
  return;
20479
20476
  }
20480
20477
  let t = Gb(this.ctx.deps.rowModel, e.target);
20481
- if (!t) return;
20482
- if (this.emitRowPointerEvent("rowClicked", t), this.ctx.cellRangeInteraction.tryClearOnPlainClick(t), this.ctx.deps.isEditing()) {
20483
- if (As(this.ctx.deps.editBehavior) && this.ctx.deps.getEditingRowId() === t.rowId && t.colId !== this.ctx.deps.getEditingCell()?.colId && this.ctx.deps.focusRowEditingColumn?.(t.colId)) return;
20484
- if (this.isSameEditingTarget(t)) return this.ctx.cellCommentSession?.handleCellClick(e, t), void 0;
20485
- if (await this.ctx.deps.commitEditing(), this.ctx.deps.isEditing()) return;
20486
- }
20487
- if (this.ctx.focusController.focusCellTarget(t), this.ctx.cellCommentSession?.handleCellClick(e, t)) return;
20488
- if (As(this.ctx.deps.editBehavior)) {
20489
- let e = this.ctx.deps.columnModel.getColumnById(t.colId);
20490
- if (!e || Os(e, this.ctx.deps.editType) !== "singleClick") return;
20491
- this.ctx.cellCommentSession?.closeAll(), this.ctx.deps.tryStartRowEditing(t);
20492
- return;
20493
- }
20494
- let n = this.ctx.deps.columnModel.getColumnById(t.colId);
20495
- if (n) {
20496
- if (r(n)) {
20497
- (n.cellEditor === "checkbox" || n.cellEditor === "switch") && !this.ctx.focusController.isInlineToggleClickTarget(e.target) && this.ctx.focusController.toggleInlineToggleAtCell(t.rowId, t.colId, t.rowIndex);
20498
- return;
20478
+ if (t) {
20479
+ if (this.emitRowPointerEvent("rowClicked", t), this.ctx.cellRangeInteraction.tryClearOnPlainClick(t), this.ctx.deps.isEditing()) {
20480
+ if (As(this.ctx.deps.editBehavior) && this.ctx.deps.getEditingRowId() === t.rowId && t.colId !== this.ctx.deps.getEditingCell()?.colId && this.ctx.deps.focusRowEditingColumn?.(t.colId)) return;
20481
+ if (this.isSameEditingTarget(t)) return this.ctx.cellCommentSession?.handleCellClick(e, t), void 0;
20482
+ if (await this.ctx.deps.commitEditing(), this.ctx.deps.isEditing()) return;
20499
20483
  }
20500
- Os(n, this.ctx.deps.editType) === "singleClick" && (this.ctx.cellCommentSession?.closeAll(), this.ctx.deps.tryStartCellEditing(t));
20484
+ this.ctx.focusController.focusCellTarget(t), !this.ctx.cellCommentSession?.handleCellClick(e, t) && (this.consumePointerUpCellActionIfMatched(t) || this.maybeStartSingleClickEditing(e, t));
20501
20485
  }
20502
20486
  };
20503
20487
  handleCellDoubleClick = async (e) => {
@@ -20519,8 +20503,110 @@ var ST = class {
20519
20503
  unbind(e) {
20520
20504
  e.removeEventListener("mousedown", this.handleCellMouseDown, !0), e.removeEventListener("click", this.handleCellClick), e.removeEventListener("dblclick", this.handleCellDoubleClick);
20521
20505
  }
20506
+ tryBeginCellRangeDragFromMouseDown(e, t, n, r) {
20507
+ return r || this.shouldSkipCellRangeDragForInlineToggleWhileEditing(e, t) || !this.ctx.cellRangeDragSession.canStart(e, t, n) ? !1 : (t.preventDefault(), this.ctx.host.clearIndexFocusIfNeeded(e.colId), this.emitCellClicked(e), this.ctx.cellRangeDragSession.begin({
20508
+ anchorRowId: e.rowId,
20509
+ anchorColId: e.colId,
20510
+ anchorRowIndex: e.rowIndex,
20511
+ clientX: t.clientX,
20512
+ clientY: t.clientY,
20513
+ mode: n
20514
+ }), !0);
20515
+ }
20522
20516
  async commitEditingForCellRangeInteraction(e, t) {
20523
- return !this.ctx.deps.isEditing() || this.isSameEditingTarget(e) || t.target instanceof Element && mo(t.target) ? !0 : (this.ctx.deps.isCommitting() && await this.ctx.deps.awaitCommitIdle(), await this.ctx.deps.commitEditing(), !this.ctx.deps.isEditing());
20517
+ if (!this.ctx.deps.isEditing() || this.isSameEditingTarget(e)) return !0;
20518
+ let n = Gb(this.ctx.deps.rowModel, t.target);
20519
+ return n && this.isSameEditingTarget(n) && t.target instanceof Element && mo(t.target) ? !0 : (this.ctx.deps.isCommitting() && await this.ctx.deps.awaitCommitIdle(), await this.ctx.deps.commitEditing(), !this.ctx.deps.isEditing());
20520
+ }
20521
+ resolveCellTargetUnderPointer(e) {
20522
+ if (typeof document.elementsFromPoint != "function") return null;
20523
+ for (let t of document.elementsFromPoint(e.clientX, e.clientY)) {
20524
+ let e = Gb(this.ctx.deps.rowModel, t);
20525
+ if (e && !(this.ctx.deps.isEditing() && this.isSameEditingTarget(e))) return e;
20526
+ }
20527
+ return null;
20528
+ }
20529
+ resolveCellTargetByIds(e, t) {
20530
+ let n = this.ctx.deps.mountEl.querySelector(`.mg-row[data-row-id="${this.escapeCssAttr(String(e))}"]`);
20531
+ if (!n) return null;
20532
+ let r = n.querySelector(`.mg-cell[data-col-id="${this.escapeCssAttr(t)}"]`);
20533
+ return r ? Gb(this.ctx.deps.rowModel, r) : null;
20534
+ }
20535
+ escapeCssAttr(e) {
20536
+ return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
20537
+ }
20538
+ async completeSingleClickEditingGesture(e, t, n) {
20539
+ if (e.button !== 0) return;
20540
+ this.ctx.deps.isCommitting() && await this.ctx.deps.awaitCommitIdle();
20541
+ let i = this.resolveAnchoredCellTargetAtPointer(e, t, n) ?? this.resolveCellTargetByIds(t, n);
20542
+ if (!i) return;
20543
+ this.ctx.deps.isEditing() && !this.isSameEditingTarget(i) && await this.ctx.deps.commitEditing();
20544
+ let a = this.ctx.deps.columnModel.getColumnById(i.colId);
20545
+ if (a && r(a) && Ko(a.cellEditor) && Y(a, i.rowNode)) {
20546
+ this.ctx.focusController.focusCellTarget(i), this.ctx.focusController.isInlineToggleClickTarget(e.target) || this.ctx.focusController.toggleInlineToggleAtCell(i.rowId, i.colId, i.rowIndex), this.markPointerUpCellActionConsumed(i);
20547
+ return;
20548
+ }
20549
+ this.ctx.focusController.focusCellTarget(i), this.maybeStartSingleClickEditing(e, i), this.markPointerUpCellActionConsumed(i);
20550
+ }
20551
+ resolveAnchoredCellTargetAtPointer(e, t, n) {
20552
+ let r = String(t);
20553
+ if (typeof document.elementsFromPoint == "function") for (let t of document.elementsFromPoint(e.clientX, e.clientY)) {
20554
+ let e = Gb(this.ctx.deps.rowModel, t);
20555
+ if (e && String(e.rowId) === r && e.colId === n) return e;
20556
+ }
20557
+ let i = Gb(this.ctx.deps.rowModel, e.target);
20558
+ return i && String(i.rowId) === r && i.colId === n ? i : null;
20559
+ }
20560
+ scheduleSingleClickEditingAfterPointerDown(e) {
20561
+ this.clearPendingSingleClickGesture?.();
20562
+ let t = Symbol("single-click-edit");
20563
+ this.pendingSingleClickGesture = t;
20564
+ let n = e.rowId, r = e.colId, i = (e) => {
20565
+ this.pendingSingleClickGesture === t && e.button === 0 && (this.pendingSingleClickGesture = null, this.clearPendingSingleClickGesture = null, document.removeEventListener("mouseup", i, !0), document.removeEventListener("pointerup", i, !0), this.completeSingleClickEditingGesture(e, n, r));
20566
+ };
20567
+ document.addEventListener("mouseup", i, { capture: !0 }), document.addEventListener("pointerup", i, { capture: !0 }), this.clearPendingSingleClickGesture = () => {
20568
+ document.removeEventListener("mouseup", i, !0), document.removeEventListener("pointerup", i, !0);
20569
+ };
20570
+ }
20571
+ shouldSchedulePointerUpWhileEditingSwitch(e, t) {
20572
+ return this.isOverlaySingleClickEditableColumn(e) || this.shouldSkipCellRangeDragForInlineToggleWhileEditing(e, t);
20573
+ }
20574
+ isOverlaySingleClickEditableColumn(e) {
20575
+ if (As(this.ctx.deps.editBehavior)) return !1;
20576
+ let t = this.ctx.deps.columnModel.getColumnById(e.colId);
20577
+ return !t || r(t) || Os(t, this.ctx.deps.editType) !== "singleClick" ? !1 : Y(t, e.rowNode);
20578
+ }
20579
+ shouldSkipCellRangeDragForInlineToggleWhileEditing(e, t) {
20580
+ if (!this.ctx.deps.isEditing() || t.shiftKey || t.ctrlKey || t.metaKey || this.ctx.focusController.isInlineToggleClickTarget(t.target)) return !1;
20581
+ let n = this.ctx.deps.columnModel.getColumnById(e.colId);
20582
+ return !n || !r(n) || !Ko(n.cellEditor) ? !1 : Y(n, e.rowNode);
20583
+ }
20584
+ markPointerUpCellActionConsumed(e) {
20585
+ this.consumedPointerUpCellAction = {
20586
+ rowId: String(e.rowId),
20587
+ colId: e.colId
20588
+ };
20589
+ }
20590
+ consumePointerUpCellActionIfMatched(e) {
20591
+ let t = this.consumedPointerUpCellAction;
20592
+ return !t || String(e.rowId) !== t.rowId || e.colId !== t.colId ? !1 : (this.consumedPointerUpCellAction = null, !0);
20593
+ }
20594
+ maybeStartSingleClickEditing(e, t) {
20595
+ if (e.ctrlKey || e.metaKey || e.shiftKey || this.ctx.deps.isEditing() && (As(this.ctx.deps.editBehavior) && this.ctx.deps.getEditingRowId() === t.rowId && t.colId !== this.ctx.deps.getEditingCell()?.colId && this.ctx.deps.focusRowEditingColumn?.(t.colId) || this.isSameEditingTarget(t))) return;
20596
+ if (As(this.ctx.deps.editBehavior)) {
20597
+ let e = this.ctx.deps.columnModel.getColumnById(t.colId);
20598
+ if (!e || Os(e, this.ctx.deps.editType) !== "singleClick") return;
20599
+ this.ctx.cellCommentSession?.closeAll(), this.ctx.deps.tryStartRowEditing(t);
20600
+ return;
20601
+ }
20602
+ let n = this.ctx.deps.columnModel.getColumnById(t.colId);
20603
+ if (n) {
20604
+ if (r(n)) {
20605
+ (n.cellEditor === "checkbox" || n.cellEditor === "switch") && !this.ctx.focusController.isInlineToggleClickTarget(e.target) && this.ctx.focusController.toggleInlineToggleAtCell(t.rowId, t.colId, t.rowIndex);
20606
+ return;
20607
+ }
20608
+ Os(n, this.ctx.deps.editType) === "singleClick" && (this.ctx.cellCommentSession?.closeAll(), this.ctx.deps.tryStartCellEditing(t));
20609
+ }
20524
20610
  }
20525
20611
  isSameEditingTarget(e) {
20526
20612
  if (!this.ctx.deps.isEditing()) return !1;