Skip to content

Commit 859ca87

Browse files
committed
Fix: PJAX statt full-page-reload beim Einschalten der Vorschau
1 parent 907ac7c commit 859ca87

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

assets/js/live_preview.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -748,11 +748,13 @@
748748
}
749749

750750
// Präferenz speichern
751-
// Beim Einschalten: reload, damit PHP den iframe frisch rendert
752-
// Beim Ausschalten: kein reload nötig (iframe ist bereits entladen)
751+
// Beim Einschalten: PJAX-Reload des Seitencontainers, damit PHP den iframe frisch rendert
752+
// Beim Ausschalten: kein Reload nötig (iframe ist bereits entladen)
753753
fetch(toggle.dataset.url + '&enabled=' + (enabled ? 1 : 0))
754754
.then(function () {
755-
if (enabled) { window.location.reload(); }
755+
if (enabled) {
756+
$.pjax.reload({ container: '#rex-js-pjax-container', timeout: 5000 });
757+
}
756758
});
757759
});
758760

0 commit comments

Comments
 (0)