modal: disable parent scrolling when opening

This commit is contained in:
jean-emmanuel 2017-02-20 17:31:01 +01:00
parent ba76c2d120
commit 1f9d35b076

View file

@ -55,6 +55,9 @@ module.exports = class Modal extends Panel {
setValue(v) {
this.value = v ? true : false
this.fixScrolling()
this.container.toggleClass('on', this.value)
this.widget.toggleClass('on', this.value)
this.light.toggleClass('on', this.value)
@ -65,6 +68,14 @@ module.exports = class Modal extends Panel {
}
fixScrolling(){
if (this.value) {
this.container.parents('.tab').first().css('overflow','hidden')
} else {
this.container.parents('.tab').first().css('overflow','')
}
}
fixStacking() {
if (this.value) {
this.container.parents('.widget').css('z-index','initial')