Fix Fetch+History form submission (again)
authorLanius Trolling <lanius@laniustrolling.dev>
Thu, 10 Oct 2024 01:43:16 +0000 (21:43 -0400)
committerLanius Trolling <lanius@laniustrolling.dev>
Thu, 10 Oct 2024 01:44:19 +0000 (21:44 -0400)
src/jvmMain/resources/static/init.js

index 26affe6454074bd64a3a3edf4bb28efaf5a4fa3d..ef3b1c0c579fcf22b5da1e7af06573aaacdc1ad9 100644 (file)
                        if (stateMode === "pop" && history.state.hash === "") {
                                window.scroll(0, history.state.scroll);
                                return;
-                       } else if (stateMode !== "pop" && url.pathname === prevUrl.pathname && url.search === prevUrl.search) {
+                       } else if (stateMode !== "pop" && formData == null && url.pathname === prevUrl.pathname && url.search === prevUrl.search) {
                                newState.href = "";
 
                                if (stateMode === "push") {