web/flows: fix invisible captcha call (#12048)

* fix invisible captcha call

* fix invisible captcha DOM removal
This commit is contained in:
Simonyi Gergő
2024-11-15 18:49:57 +01:00
committed by GitHub
parent 0bdef2a0f4
commit 9c27b81e4b

View File

@ -85,7 +85,7 @@ export class CaptchaStage extends BaseStage<CaptchaChallenge, CaptchaChallengeRe
super.disconnectedCallback();
window.removeEventListener("message", this.messageCallback);
if (!this.challenge.interactive) {
document.removeChild(this.captchaDocumentContainer);
document.body.removeChild(this.captchaDocumentContainer);
}
}
@ -173,7 +173,7 @@ export class CaptchaStage extends BaseStage<CaptchaChallenge, CaptchaChallengeRe
.forEach((el) => el.remove());
document.head.appendChild(this.scriptElement);
if (!this.challenge.interactive) {
document.appendChild(this.captchaDocumentContainer);
document.body.appendChild(this.captchaDocumentContainer);
}
}
}