fix reload after submit

This commit is contained in:
null
2024-03-05 08:05:31 +01:00
parent 71e1ec06e4
commit 63b76e1579
6 changed files with 11 additions and 6 deletions
+5 -1
View File
@@ -3,8 +3,12 @@ document.addEventListener('DOMContentLoaded', documentReady, false);
function documentReady() {
const iframe = document.querySelector("iframe");
const dialog = document.querySelector("dialog");
iframe.onload = () => {
iframe.onload = (event) => {
dialog.style.height = iframe.contentWindow.document.body.getBoundingClientRect().height + "px";
if (event.target.contentWindow.location.search.includes("submitted")) {
dialog.close();
window.location.href=window.location.href
}
}
}