Current Behavior
When a user is using the timer feature, there is an option to dismiss the modal. If a timer is still running (and beeping), and the user dismisses the modal, the javascript for the timer will keep running. The user has to refresh the show page or re-open the modal and click "Stop" to make the timer stop. FYI, the "Stop" button simply refreshes the show page.
Preferred Behavior
If the user clicks "Stop" or if the user dismisses the modal, I'd like the timer to stop beeping and reset itself.
This may help: https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearTimeout
Current Behavior
When a user is using the timer feature, there is an option to dismiss the modal. If a timer is still running (and beeping), and the user dismisses the modal, the javascript for the timer will keep running. The user has to refresh the show page or re-open the modal and click "Stop" to make the timer stop. FYI, the "Stop" button simply refreshes the show page.
Preferred Behavior
If the user clicks "Stop" or if the user dismisses the modal, I'd like the timer to stop beeping and reset itself.
This may help: https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearTimeout