File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ trigger React's event handlers.
5555
5656< button onClick= {() => {
5757 document .getElementById (' myForm' )
58- .dispatchEvent (new Event (' submit' , { cancelable: true })) // ✅
58+ .dispatchEvent (new Event (' submit' , { cancelable: true , bubbles : true })) // ✅
5959}}> Submit< / button>
6060
6161< form id= " myForm" onSubmit= {handleSubmit}>
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ const App = () => {
3232 // https://github.com/facebook/react/issues/12639#issuecomment-382519193
3333 document
3434 . getElementById ( 'exampleForm' )
35- . dispatchEvent ( new Event ( 'submit' , { cancelable : true } ) )
35+ . dispatchEvent ( new Event ( 'submit' , { cancelable : true , bubbles : true } ) )
3636 }
3737 >
3838 External Submit via < code > document.getElementById()</ code >
You can’t perform that action at this time.
0 commit comments