Skip to content

Commit e421444

Browse files
Marton Bodonyiepicfaace
authored andcommitted
Fix IE11 not able to submit (rjsf-team#1432)
* Fix rjsf-team#1431 - ie11 not able to submit * Fix code formatting * Add react-app-polyfill/ie11 for playground
1 parent 1202e22 commit e421444

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

playground/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import MonacoEditor from "react-monaco-editor";
55
import { shouldRender } from "../src/utils";
66
import { samples } from "./samples";
77
import Form from "../src";
8+
import "react-app-polyfill/ie11";
89

910
const log = type => console.log.bind(console, type);
1011
const toJson = val => JSON.stringify(val, null, 2);

src/components/Form.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,11 @@ export default class Form extends Component {
323323

324324
submit() {
325325
if (this.formElement) {
326-
this.formElement.dispatchEvent(new Event("submit", { cancelable: true }));
326+
this.formElement.dispatchEvent(
327+
new CustomEvent("submit", {
328+
cancelable: true,
329+
})
330+
);
327331
}
328332
}
329333

0 commit comments

Comments
 (0)