Work-around for incorrect dropdown overflow
authorAlexander Ebert <ebert@woltlab.com>
Tue, 25 Oct 2016 09:46:32 +0000 (11:46 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 25 Oct 2016 09:46:32 +0000 (11:46 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js
wcfsetup/install/files/style/bootstrap/mixin/dropdownMenu.scss

index 0eb78196721b9f2f56be34c8c61428d3a98cc84f..b7560e8793f7fb78a84eeafc144d206c6dc7a27c 100644 (file)
@@ -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);
index 8063de9896a4c24b1503f9563365dda7c59487c5..77cfc6ae7091603daf01edaf9888c9df9c1443d1 100644 (file)
        .scrollableDropdownMenu {
                max-height: 300px;
                overflow: auto;
+               
+               &.forceScrollbar {
+                       overflow-y: scroll;
+                       overflow-x: hidden;
+               }
        }
        
        @include screen-xs {