From 1f9d35b076585586844c15f1475e77701f016f07 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 20 Feb 2017 17:31:01 +0100 Subject: [PATCH] modal: disable parent scrolling when opening --- src/browser/js/app/widgets/containers/modal.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/browser/js/app/widgets/containers/modal.js b/src/browser/js/app/widgets/containers/modal.js index 731a7ff6..124e15a6 100644 --- a/src/browser/js/app/widgets/containers/modal.js +++ b/src/browser/js/app/widgets/containers/modal.js @@ -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')