From: Alexander Ebert <ebert@woltlab.com> Date: Tue, 25 Oct 2016 09:46:32 +0000 (+0200) Subject: Work-around for incorrect dropdown overflow X-Git-Tag: 3.0.0_Beta_4~21 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ef1a541bfd3cc479b1501d67d2f9eb8f1e2f420b;p=GitHub%2FWoltLab%2FWCF.git Work-around for incorrect dropdown overflow --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js index 0eb7819672..b7560e8793 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js @@ -452,6 +452,11 @@ define( } } + var itemList = elBySel('.scrollableDropdownMenu', menu); + if (itemList !== null) { + itemList.classList[(itemList.scrollHeight > itemList.clientHeight ? 'add' : 'remove')]('forceScrollbar'); + } + this._notifyCallbacks(containerId, 'open'); this.setAlignment(dropdown, menu, alternateElement); diff --git a/wcfsetup/install/files/style/bootstrap/mixin/dropdownMenu.scss b/wcfsetup/install/files/style/bootstrap/mixin/dropdownMenu.scss index 8063de9896..77cfc6ae70 100644 --- a/wcfsetup/install/files/style/bootstrap/mixin/dropdownMenu.scss +++ b/wcfsetup/install/files/style/bootstrap/mixin/dropdownMenu.scss @@ -124,6 +124,11 @@ .scrollableDropdownMenu { max-height: 300px; overflow: auto; + + &.forceScrollbar { + overflow-y: scroll; + overflow-x: hidden; + } } @include screen-xs {