diff --git a/web/app/assets/javascripts/react-components/PopupMediaControls.js.jsx.coffee b/web/app/assets/javascripts/react-components/PopupMediaControls.js.jsx.coffee index 0004befc7..2266aa5ed 100644 --- a/web/app/assets/javascripts/react-components/PopupMediaControls.js.jsx.coffee +++ b/web/app/assets/javascripts/react-components/PopupMediaControls.js.jsx.coffee @@ -737,6 +737,14 @@ mixins.push(Reflux.listenTo(UserStore, 'onUserChanged')) $(window).unload(@windowUnloaded) + $(window).on('beforeunload', (event) => + # Cancel the event as stated by the standard. + #event.preventDefault() + #Chrome requires returnValue to be set. + #event.returnValue = '' + SessionActions.log({msg:"beforeunload", event: event}) + ) + @root = jQuery(this.getDOMNode()) $loop = @root.find('input[name="loop"]')