Skip to content

Commit 6bed83b

Browse files
authored
fix: destroy control boundary error #895
1 parent 49360fd commit 6bed83b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/editor/core/draw/control/Control.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,6 @@ export class Control {
272272
}
273273

274274
public initControl() {
275-
const isReadonly = this.draw.isReadonly()
276-
if (isReadonly) return
277275
const elementList = this.getElementList()
278276
const range = this.getRange()
279277
const element = elementList[range.startIndex]
@@ -296,6 +294,8 @@ export class Control {
296294
// 销毁旧激活控件
297295
this.destroyControl()
298296
// 激活控件
297+
const isReadonly = this.draw.isReadonly()
298+
if (isReadonly) return
299299
const control = element.control!
300300
if (control.type === ControlType.TEXT) {
301301
this.activeControl = new TextControl(element, this)

0 commit comments

Comments
 (0)