diff --git a/src/editor/core/event/CanvasEvent.ts b/src/editor/core/event/CanvasEvent.ts index af174ed..091f51f 100644 --- a/src/editor/core/event/CanvasEvent.ts +++ b/src/editor/core/event/CanvasEvent.ts @@ -359,6 +359,7 @@ export class CanvasEvent { } this.range.setRange(curIndex, curIndex) this.draw.render({ curIndex }) + evt.preventDefault() } else if (evt.key === KeyMap.Left) { if (isReadonly) return if (index > 0) { diff --git a/src/editor/core/range/RangeManager.ts b/src/editor/core/range/RangeManager.ts index 4d8e778..ba3e487 100644 --- a/src/editor/core/range/RangeManager.ts +++ b/src/editor/core/range/RangeManager.ts @@ -56,7 +56,7 @@ export class RangeManager { this.range.isCrossRowCol = !!(startTdIndex || endTdIndex || startTrIndex || endTrIndex) // 激活控件 const control = this.draw.getControl() - if (~startIndex && ~endIndex && startIndex === startIndex) { + if (~startIndex && ~endIndex) { const elementList = this.draw.getElementList() const element = elementList[startIndex] if (element?.type === ElementType.CONTROL) {