Closed
Description
React version: 241c446
Steps To Reproduce
https://codesandbox.io/s/romantic-gates-2hrjp
- Click "Show A" to render the lazy component.
- Type into the input whose placeholder says it works. startTransition will call, inline loading will show for 2 seconds, then the Suspense boundary will trigger.
- Click the "update" button - same as above - everything works
- Now type into the input whose placeholder says it doesn't work. Note that the inline placeholder stays up for the entire time; the Suspense boundary never shows.
- Now note that steps 2 or 3 will likely immediately show the suspense boundary. The bypassed rendering of the Suspense boundary from step 4 seems to be backed up, stuck somewhere, and is now unleashed.
Note that steps 2 and 3 are optional. No matter what, the preventDefault that's called in step 4 causes this incorrect behavior no matter whether steps 2 or 3 have been exercised.
Link to code example: see above
The current behavior
startTransition should suspend after the timeout even if event.preventDefault is called.
The expected behavior
it does not