Skip to content

Commit

Permalink
fix: control content change event boundary error #996
Browse files Browse the repository at this point in the history
  • Loading branch information
Hufe921 committed Feb 11, 2025
1 parent b77fd96 commit e6c681d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/editor/core/draw/control/Control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ export class Control {
const elementList = context.elementList || this.getElementList()
const { startIndex } = context.range || this.getRange()
const startElement = elementList[startIndex]
if (!startElement?.controlId) return []
const data: IElement[] = []
// 向左查找
let preIndex = startIndex
Expand Down Expand Up @@ -493,6 +494,11 @@ export class Control {
const controlElement =
options?.controlElement || this.activeControl?.getElement()
if (!controlElement) return
// 控件被删除不触发事件
const elementList = options?.context?.elementList || this.getElementList()
const { startIndex } = options?.context?.range || this.getRange()
if (!elementList[startIndex]?.controlId) return
// 格式化回调数据
const controlValue =
options?.controlValue || this.getControlElementList(options?.context)
let control: IControl
Expand Down

0 comments on commit e6c681d

Please sign in to comment.