When movie popup opens we add a no-scroll class to the body element. This prevents scrolling the content behind the popover content.

This commit is contained in:
2019-10-30 22:11:09 +01:00
parent 3033db02b8
commit 98644513ad
2 changed files with 6 additions and 0 deletions

View File

@@ -123,6 +123,10 @@ img{
height: auto;
}
.no-scroll {
overflow: hidden;
}
.wrapper{
position: relative;
}

View File

@@ -32,9 +32,11 @@ export default {
},
created(){
window.addEventListener('keyup', this.checkEventForEscapeKey)
document.getElementsByTagName("body")[0].classList += " no-scroll";
},
beforeDestroy() {
window.removeEventListener('keyup', this.checkEventForEscapeKey)
document.getElementsByTagName("body")[0].classList.remove("no-scroll");
}
}