-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: page warning before leave/reload while a call is ongoing #33404
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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