From 877ec194c6ebbcde555195498ca5e726cc92e4d8 Mon Sep 17 00:00:00 2001 From: Brian Ernesto Date: Tue, 5 Mar 2024 19:35:38 -0700 Subject: [PATCH] Prevent comments from being processed when selected in the layers tree. --- src/commands/view/ShowOffset.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/view/ShowOffset.ts b/src/commands/view/ShowOffset.ts index a7953aadd..7e9c1cfa7 100644 --- a/src/commands/view/ShowOffset.ts +++ b/src/commands/view/ShowOffset.ts @@ -18,9 +18,9 @@ export default { const zoom = this.em.getZoomDecimal(); const el = opt.el as HTMLElement | undefined; - // if (!(el instanceof HTMLElement)) { - // return; - // } + if (!(el instanceof HTMLElement)) { + return; + } if (!config.showOffsets || !el || isTextNode(el) || (!config.showOffsetsSelected && state == 'Fixed')) { editor.stopCommand(`${this.id}`, opts);