From: Alexander Ebert Date: Fri, 4 Feb 2022 13:10:58 +0000 (+0100) Subject: Skip close requests originating from the search drop-down itself X-Git-Tag: 5.5.0_Alpha_1~159 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=93f14ceff14a95ae31b8d5e8f8fdd5e6ded3276c;p=GitHub%2FWoltLab%2FWCF.git Skip close requests originating from the search drop-down itself --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index cf3a3908b5..1502ba029e 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -4471,7 +4471,13 @@ WCF.Search.Base = Class.extend({ return; } - WCF.CloseOverlayHandler.addCallback('WCF.Search.Base', $.proxy(function() { this._clearList(); }, this)); + WCF.CloseOverlayHandler.addCallback('WCF.Search.Base', (origin, identifier) => { + if (origin === "dropdown" && identifier === this._searchInput[0].parentElement.id) { + return; + } + + this._clearList(); + }); var $containerID = this._searchInput.parents('.dropdown').wcfIdentify(); if (!WCF.Dropdown.getDropdownMenu($containerID).hasClass('dropdownOpen')) {