From d52533b8c0bdbd576ae4413df9a964351706df7c Mon Sep 17 00:00:00 2001 From: Preston Date: Tue, 22 Dec 2020 13:58:17 -0500 Subject: [PATCH] Close full window properly to prevent scrolling issues --- .../components/ft-video-player/ft-video-player.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/renderer/components/ft-video-player/ft-video-player.js b/src/renderer/components/ft-video-player/ft-video-player.js index dcc454ff..344d5d6f 100644 --- a/src/renderer/components/ft-video-player/ft-video-player.js +++ b/src/renderer/components/ft-video-player/ft-video-player.js @@ -17,6 +17,9 @@ export default Vue.extend({ 'ft-card': FtCard }, beforeRouteLeave: function () { + if (this.player !== null) { + this.exitFullWindow() + } if (this.player !== null && !this.player.isInPictureInPicture()) { this.player.dispose() this.player = null @@ -152,10 +155,14 @@ export default Vue.extend({ this.determineMaxFramerate() }, beforeDestroy: function () { - if (this.player !== null && !this.player.isInPictureInPicture()) { - this.player.dispose() - this.player = null - clearTimeout(this.mouseTimeout) + if (this.player !== null) { + this.exitFullWindow() + + if (!this.player.isInPictureInPicture()) { + this.player.dispose() + this.player = null + clearTimeout(this.mouseTimeout) + } } }, methods: {