fix reload after submit
This commit is contained in:
+5
-1
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user