Skip to content

Commit 27b9b8e

Browse files
committed
Fallback to form.submit if requestSubmit isn't available.
Closes #397.
1 parent 2a0ff31 commit 27b9b8e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- [SuperDebug](https://superforms.rocks/super-debug) support for `Map` and `Set`.
1313

14+
### Fixed
15+
16+
- `submit` method now falls back to submit, if no support for requestSubmit in browser.
17+
1418
## [2.12.2] - 2024-03-29
1519

1620
### Fixed

src/lib/client/superForm.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2100,6 +2100,10 @@ export function superForm<
21002100
);
21012101
}
21022102

2103+
if (!form.requestSubmit) {
2104+
return form.submit();
2105+
}
2106+
21032107
const isSubmitButton =
21042108
submitter &&
21052109
((submitter instanceof HTMLButtonElement && submitter.type == 'submit') ||

0 commit comments

Comments
 (0)