From 3588b325ec4b0413c42056d12e421b0e0bde8000 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 27 Feb 2017 11:40:23 +0100 Subject: [PATCH] Fixed dropdown menu destruction --- .../files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 0a6b2c3021..088426aca7 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js @@ -284,15 +284,14 @@ define( try { this.close(containerId); - var menu = _menus.get(containerId); - _menus.parentNode.removeChild(menu); + elRemove(_menus.get(containerId)); } catch (e) { - // the elements might not exist anymore thus ignore all errors cleaning up + // the elements might not exist anymore thus ignore all errors while cleaning up } - _menus['delete'](containerId); - _dropdowns['delete'](containerId); + _menus.delete(containerId); + _dropdowns.delete(containerId); return true; }, -- 2.20.1