Close full window properly to prevent scrolling issues

This commit is contained in:
Preston 2020-12-22 13:58:17 -05:00
parent e1266ec675
commit d52533b8c0
1 changed files with 11 additions and 4 deletions

View File

@ -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: {