Chrome prompts "Changes you made may not be saved" via dialog when navigating away from a video call. This happens after interacting with any video setting. I do not wish to click additional chrome dialogs due to the way your video application behaves, using global event listeners. I want to prevent our users from being nagged with ugly chrome dialogs. Furthermore, this creates an additional step for a user to interact with, blocking them from navigation away from the video page.
To reproduce:
Host a video chat
Load your camera
Interact with any setting, via any button (such as changing audio device)
Navigate away to another site
This seems to be related to the way you attach a global beforeunload handler to the window object when cometchat loads in it's frame. Chrome presents this dialog as a means of protection against the session data that's being manipulated there.
As such, your code:
P.beforeUnload = function(e) {
var t = P.getDataFromSessionStorage(L.SESSION_STORE.SESSION_ID);
P.removeDataFromSessionStorage(L.SESSION_STORE.SESSION_ID),
C.LocalStorage.getInstance().set(L.SESSION_STORE.SESSION_ID, t)
}
This event's default behavior needs to be overwritten, nullified, or returned false.
I can solve this situation by implementing my own webRTC solution, however to continue to use cometchat as a hosted solution, I expect this to be resolved gracefully. Please do not nag my users when they try to navigate away from the site after interacting with video options.
Thank you.
Let me know if you'd accept my pull request if you cannot solve this.
Chrome prompts "Changes you made may not be saved" via dialog when navigating away from a video call. This happens after interacting with any video setting. I do not wish to click additional chrome dialogs due to the way your video application behaves, using global event listeners. I want to prevent our users from being nagged with ugly chrome dialogs. Furthermore, this creates an additional step for a user to interact with, blocking them from navigation away from the video page.
To reproduce:
This seems to be related to the way you attach a global
beforeunload
handler to the window object when cometchat loads in it's frame. Chrome presents this dialog as a means of protection against the session data that's being manipulated there.As such, your code:
This event's default behavior needs to be overwritten, nullified, or returned false.
I can solve this situation by implementing my own webRTC solution, however to continue to use cometchat as a hosted solution, I expect this to be resolved gracefully. Please do not nag my users when they try to navigate away from the site after interacting with video options.
Thank you.
Let me know if you'd accept my pull request if you cannot solve this.