From 2ee082b956b74d40f0a26e30238481fc06e79281 Mon Sep 17 00:00:00 2001 From: Vishal Banthia Date: Tue, 24 Nov 2015 19:36:12 +0900 Subject: [PATCH] Remove listener for windows.onbeforeload as it is closing the websocket connection. Fix https://github.com/openstf/stf/issues/184 --- res/app/components/stf/screen/screen-directive.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/res/app/components/stf/screen/screen-directive.js b/res/app/components/stf/screen/screen-directive.js index 888d575b..65dfd2f3 100644 --- a/res/app/components/stf/screen/screen-directive.js +++ b/res/app/components/stf/screen/screen-directive.js @@ -383,7 +383,6 @@ module.exports = function DeviceScreenDirective( 'letterboxed', parentAspect < canvasAspect) } - $window.addEventListener('beforeunload', stop, false) $window.addEventListener('resize', resizeListener, false) scope.$on('fa-pane-resize', resizeListener) @@ -391,7 +390,6 @@ module.exports = function DeviceScreenDirective( scope.$on('$destroy', function() { stop() - $window.removeEventListener('beforeunload', stop, false) $window.removeEventListener('resize', resizeListener, false) }) })()