From 2bc325d8e82e963e10084a88a3cbf7d16350015a Mon Sep 17 00:00:00 2001
From: Kalle <38327916+Sendouc@users.noreply.github.com>
Date: Tue, 15 Aug 2023 00:05:01 +0300
Subject: [PATCH] Render button _action value as hidden input
---
app/components/SubmitButton.tsx | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/app/components/SubmitButton.tsx b/app/components/SubmitButton.tsx
index 106f56582..1393571e1 100644
--- a/app/components/SubmitButton.tsx
+++ b/app/components/SubmitButton.tsx
@@ -32,16 +32,24 @@ export function SubmitButton({
return undefined;
};
+ // render action as hidden input to deal with a bug in older Safari versions
+ const isActionValue = name() === "_action";
+
return (
-
+ <>
+ {isActionValue ? (
+
+ ) : null}
+
+ >
);
}