timers are not always stopped when leaving a page
Describe the bug When leaving a page, the associated timer-sequence continues. In some cases, returning to the page starts a new timer, causing multiple timers to be active.
To Reproduce tbd
Expected behaviour
Page/panel-related timers must be stopped when leaving the page.
See e.g. options.js. function onHide.
Additional context one positive factor: most timer-sequences are not infinite sequences.
proposal to create panelTimerHelper function.
timer is registered in Panel.
timer is disabled when isFinished=true, or when onHide is called
parameters:
- actionCallback function
- runFirstTime flag, runs the callback extra immediately
- isFinished function, signals that no more runs are needed
- isSkipped function, signals that this run is not needed
- playPause setting is always considered for skipping the function
- playPause will be hidden when
isFinished=true
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code