Fixed dropdown menu destruction
authorAlexander Ebert <ebert@woltlab.com>
Mon, 27 Feb 2017 10:40:23 +0000 (11:40 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 27 Feb 2017 10:40:23 +0000 (11:40 +0100)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js

index 0a6b2c3021954df105bf29b5bec281ded1fc1d52..088426aca75de24c39e92927d2ee8a816f7460ea 100644 (file)
@@ -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;
                },