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:
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user