When setting the time of a repeated timer with the mouse, this triggered both onChange() and setOpen() at the same time, both of which calling setRepeatPatterns(). Due to the async/deferred nature of React, these both worked on old data, so that the first callback was effectively ignored, and created timers ended up with the default "00:00" time. Fix that with a functional state update.
Also replace the weird JSON stringify/parse cycle with a spread, like all the other callbacks already did -- the only purpose of that was to copy the list.
This didn't happen when setting the time with the keyboard, because the dropdown wasn't opened then. So change TestTimers() to set the "Friday" repeat time with the mouse (keep the Monday one with the keyboard, to cover both cases). As we only have 30-minute granularity, change the time from 12:45 to 12:30.
The test uses select_PF5(), so drop it from the vulture suppressions. (c-machines also uses that function.)
When setting the time of a repeated timer with the mouse, this triggered both
onChange()
andsetOpen()
at the same time, both of which callingsetRepeatPatterns()
. Due to the async/deferred nature of React, these both worked on old data, so that the first callback was effectively ignored, and created timers ended up with the default "00:00" time. Fix that with a functional state update.Also replace the weird JSON stringify/parse cycle with a spread, like all the other callbacks already did -- the only purpose of that was to copy the list.
This didn't happen when setting the time with the keyboard, because the dropdown wasn't opened then. So change TestTimers() to set the "Friday" repeat time with the mouse (keep the Monday one with the keyboard, to cover both cases). As we only have 30-minute granularity, change the time from 12:45 to 12:30.
The test uses select_PF5(), so drop it from the vulture suppressions. (c-machines also uses that function.)
Fixes #19278