fix syntax loop debugger misalignment

This commit is contained in:
LenAnderson 2024-07-29 21:43:38 -04:00
parent 1d4c44fcf6
commit 18e3659914
1 changed files with 5 additions and 0 deletions

View File

@ -927,6 +927,11 @@ export class QuickReply {
if (!messageSyntaxInner || !message) return requestAnimationFrame(updateSyntaxLoop);
// elements no longer part of the document
if (!messageSyntaxInner.closest('body')) return;
// debugger is running
if (this.isExecuting) {
lastMessageValue = null;
return requestAnimationFrame(updateSyntaxLoop);
}
// value hasn't changed
if (wasSyntax == syntax.checked && lastMessageValue == message.value) return requestAnimationFrame(updateSyntaxLoop);
wasSyntax = syntax.checked;