Closed Viicos closed 12 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
0fefecd
) 71.25% compared to head (fe01a61
) 65.20%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Backports: b646d30e2bbd0d40e663fe198dbf8bdeda8869eb, 5d34139357b3d66b3f37378bccdabff3dfca7279 and 0f3462e3c963a433346fee044315d71a29fbc505
Fixes https://github.com/open-formulieren/open-forms/issues/3572.
The race condition happens after
onFormIOChange
is called a first time:onFormIOChange
will schedule a call toevaluateFormLogic
that will in turn dispatchBLOCK_SUBMISSION
(thus settingcanSubmit=false
). Logic check is performed, andLOGIC_CHECK_DONE
is about to be dispatched (which will setcanSubmit
totrue
if the logic check allows it).For some reason, having a colored HTML element triggers
onFormIOChange
at this specific time. On Firefox,LOGIC_CHECK_DONE
was fired in time so it had time to setcanSubmit
totrue
again (as you can seelogicChecking
isfalse
when thisonFormIOChange
call happens). However, WebKit seems to be to slow andonFormIOChange
is called beforeLOGIC_CHECK_DONE
is fired.For now my fix is to return if we are still formChecking, but ideally a more robust solution should be found (e.g. a queue handling all the form change events?)