fix(partial): form dialog method not supported (#2927)

The `<form>` method value `dialog` does no network request, so we should
ignore it for partials.

Fixes https://github.com/denoland/fresh/issues/2885
This commit is contained in:
Marvin Hagemeister
2025-05-12 21:19:19 +02:00
committed by GitHub
parent 95b82f5281
commit d2da471d67
2 changed files with 40 additions and 4 deletions
+1 -4
View File
@@ -219,10 +219,7 @@ document.addEventListener("submit", async (e) => {
const lowerMethod =
e.submitter?.getAttribute("formmethod")?.toLowerCase() ??
el.method.toLowerCase();
if (
lowerMethod !== "get" && lowerMethod !== "post" &&
lowerMethod !== "dialog"
) {
if (lowerMethod !== "get" && lowerMethod !== "post") {
return;
}