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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user