@@ -278,10 +278,10 @@ describe('ReactDOMEventListener', () => {
278278 document . body . removeChild ( container ) ;
279279 } ) ;
280280
281- // This is a special case for submit and reset events as they are listened on
282- // at the element level and not the document .
283- // @see https://github.com/facebook/react/pull/13462
284- it ( 'should (or not) receive submit events if native, interim DOM handler prevents it' , ( ) => {
281+ // This tests an implementation detail that submit/ reset events are listened to
282+ // at the document level, which is necessary for event replaying to work .
283+ // They bubble in all modern browsers.
284+ it ( 'should not receive submit events if native, interim DOM handler prevents it' , ( ) => {
285285 const container = document . createElement ( 'div' ) ;
286286 document . body . appendChild ( container ) ;
287287
@@ -316,13 +316,8 @@ describe('ReactDOMEventListener', () => {
316316 } ) ,
317317 ) ;
318318
319- if ( gate ( flags => flags . enableFormEventDelegation ) ) {
320- expect ( handleSubmit ) . not . toHaveBeenCalled ( ) ;
321- expect ( handleReset ) . not . toHaveBeenCalled ( ) ;
322- } else {
323- expect ( handleSubmit ) . toHaveBeenCalled ( ) ;
324- expect ( handleReset ) . toHaveBeenCalled ( ) ;
325- }
319+ expect ( handleSubmit ) . not . toHaveBeenCalled ( ) ;
320+ expect ( handleReset ) . not . toHaveBeenCalled ( ) ;
326321 } finally {
327322 document . body . removeChild ( container ) ;
328323 }
0 commit comments