diff --git a/web/DocumentEditor.tsx b/web/DocumentEditor.tsx
index a417728..a86ff6c 100644
--- a/web/DocumentEditor.tsx
+++ b/web/DocumentEditor.tsx
@@ -197,7 +197,8 @@ export const DocumentEditor = ({ resource, id, onClose }: Props) => {
template !== '' &&
lines.some((l) => l.name.trim());
- const save = () => {
+ const save = (ev?: React.FormEvent) => {
+ ev?.preventDefault();
// The three resources agree on everything below the header, and disagree on nothing but it.
const header = isRecurring
? {
@@ -260,18 +261,18 @@ export const DocumentEditor = ({ resource, id, onClose }: Props) => {
const busy = create.isPending || update.isPending;
return (
-
-
+
);
};
diff --git a/web/RecordEditors.tsx b/web/RecordEditors.tsx
index 792eb1e..1d48e10 100644
--- a/web/RecordEditors.tsx
+++ b/web/RecordEditors.tsx
@@ -87,21 +87,31 @@ const EditorShell = ({
}) => (
);
@@ -289,7 +299,7 @@ const AddressFields = ({
{label}
{onCopy && (
-