modal: disable parent scrolling when opening
This commit is contained in:
parent
ba76c2d120
commit
1f9d35b076
1 changed files with 11 additions and 0 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue