feat: page warning before leave/reload while a call is ongoing#33404
feat: page warning before leave/reload while a call is ongoing#33404kodiakhq[bot] merged 3 commits intodevelopfrom
Conversation
|
Looks like this PR is ready to merge! 🎉 |
|
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #33404 +/- ##
========================================
Coverage 58.57% 58.57%
========================================
Files 2737 2737
Lines 65763 65763
Branches 14826 14826
========================================
Hits 38521 38521
Misses 24463 24463
Partials 2779 2779
Flags with carried forward coverage won't be shown. Click here to find out more. |
cd8dfb2 to
ba0f47d
Compare
tassoevan
left a comment
There was a problem hiding this comment.
It think there is one situation when the onBeforeUnload might not get detached correctly. Imagine a situation where onCallEstablished was called (attaching it) but then an error is throw from a component; VoipProvider is unmounted, the error is caught at AppRoot's error boundary, and the onBeforeUnload will be attached to window yet. Maybe an extra call to window.removeEventListener('beforeunload', onBeforeUnload); at the effect clean up function will prevent it from happening.
Proposed changes (including videos or screenshots)
Users should now be warned when trying to leave or reloading the page during calls.
Issue(s)
VOIP-98
Steps to test or reproduce
Further comments