From d6ee84dd6be5ea63d8b00f0f4347dbf82d7529db Mon Sep 17 00:00:00 2001 From: LenAnderson Date: Wed, 19 Jun 2024 09:45:30 -0400 Subject: [PATCH] fixes --- public/scripts/extensions/quick-reply/src/QuickReply.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/scripts/extensions/quick-reply/src/QuickReply.js b/public/scripts/extensions/quick-reply/src/QuickReply.js index 09894ae36..fc3d90319 100644 --- a/public/scripts/extensions/quick-reply/src/QuickReply.js +++ b/public/scripts/extensions/quick-reply/src/QuickReply.js @@ -645,20 +645,22 @@ export class QuickReply { } this.editorDebugState.textContent = JSON.stringify(closure.scope.variables, (key, val)=>{ if (val instanceof SlashCommandClosure) return val.toString(); + if (val === undefined) return null; return val; }, 2); this.editorDebugState.classList.add('qr--active'); const loc = this.getEditorPosition(executor.start - 1, executor.end); + const layer = this.editorPopup.dlg.getBoundingClientRect(); const hi = document.createElement('div'); hi.style.position = 'fixed'; - hi.style.left = `${loc.left}px`; + hi.style.left = `${loc.left - layer.left}px`; hi.style.width = `${loc.right - loc.left}px`; - hi.style.top = `${loc.top}px`; + hi.style.top = `${loc.top - layer.top}px`; hi.style.height = `${loc.bottom - loc.top}px`; hi.style.zIndex = '50000'; hi.style.pointerEvents = 'none'; hi.style.backgroundColor = 'rgb(255 255 0 / 0.5)'; - document.body.append(hi); + this.editorPopup.dlg.append(hi); const isStepping = await this.debugController.awaitContinue(); hi.remove(); this.editorDebugState.textContent = '';