Fixed interactive dropdown collapsing on scroll
authorAlexander Ebert <ebert@woltlab.com>
Wed, 17 Aug 2016 11:39:21 +0000 (13:39 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 17 Aug 2016 11:39:21 +0000 (13:39 +0200)
wcfsetup/install/files/js/WCF.js

index e6aeac305e697c449ed8574825bdfdbbe1bf5388..c250826f2ae7dcb36c59b9dd869a21c10568f97f 100755 (executable)
@@ -1010,7 +1010,12 @@ WCF.Dropdown.Interactive.Handler = {
                if (this._dropdownContainer === null) {
                        this._dropdownContainer = $('<div class="dropdownMenuContainer" />').appendTo(document.body);
                        WCF.CloseOverlayHandler.addCallback('WCF.Dropdown.Interactive.Handler', $.proxy(this.closeAll, this));
-                       window.addEventListener('scroll', this.closeAll.bind(this));
+                       
+                       window.addEventListener('scroll', (function (event) {
+                               if (!document.documentElement.classList.contains('pageOverlayActive')) {
+                                       this.closeAll.bind(this)
+                               }
+                       }).bind(this));
                }
                
                var $instance = new WCF.Dropdown.Interactive.Instance(this._dropdownContainer, triggerElement, identifier, options);