From: Alexander Ebert Date: Thu, 14 Jul 2016 16:41:48 +0000 (+0200) Subject: Hiding page actions when overlays/mobile menu is open X-Git-Tag: 3.0.0_Beta_1~1137 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=71c30b1c2d91a7bfe921a8a19de99b1467ac0651;p=GitHub%2FWoltLab%2FWCF.git Hiding page actions when overlays/mobile menu is open --- diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Dialog.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Dialog.js index 373b79af8d..0ca68efd78 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Dialog.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Dialog.js @@ -220,6 +220,8 @@ define( this._createDialog(id, html, options); } + document.documentElement.classList.add('pageOverlayActive'); + return _dialogs.get(id); }, @@ -520,6 +522,7 @@ define( elData(_container, 'close-on-click', 'false'); window.removeEventListener('keyup', _keyupListener); + document.documentElement.classList.remove('pageOverlayActive'); } else { data = _dialogs.get(_activeDialog); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Page/Menu/Abstract.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Page/Menu/Abstract.js index 6a88b2ff33..cab400d793 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Page/Menu/Abstract.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Page/Menu/Abstract.js @@ -99,6 +99,8 @@ define(['Environment', 'EventHandler', 'ObjectMap', 'Dom/Traverse', 'Dom/Util', UiScreen.scrollDisable(); _pageContainer.classList.add('menuOverlay-' + this._menu.id); + + document.documentElement.classList.add('pageOverlayActive'); }, /** @@ -117,6 +119,8 @@ define(['Environment', 'EventHandler', 'ObjectMap', 'Dom/Traverse', 'Dom/Util', UiScreen.scrollEnable(); _pageContainer.classList.remove('menuOverlay-' + this._menu.id); + + document.documentElement.classList.remove('pageOverlayActive'); } }, diff --git a/wcfsetup/install/files/style/ui/pageAction.scss b/wcfsetup/install/files/style/ui/pageAction.scss index af87592160..8c7ff31b6f 100644 --- a/wcfsetup/install/files/style/ui/pageAction.scss +++ b/wcfsetup/install/files/style/ui/pageAction.scss @@ -68,3 +68,7 @@ } } } + +.pageOverlayActive .pageAction { + display: none; +}