From aa3a20bbc22e2e1a4802c7b4c3e3e14e4880d839 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Tue, 23 Sep 2014 21:01:53 +0200 Subject: [PATCH] Menu: patch removeElement, not remove --- source/Ox.UI/js/Menu/Menu.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/Ox.UI/js/Menu/Menu.js b/source/Ox.UI/js/Menu/Menu.js index a6b6b5f8..e9b766ae 100644 --- a/source/Ox.UI/js/Menu/Menu.js +++ b/source/Ox.UI/js/Menu/Menu.js @@ -740,15 +740,13 @@ Ox.Menu = function(options, self) { }; /*@ - remove remove - () -> remove menu + removeElement removeElement @*/ - self.superRemove = that.remove.bind(that); - that.remove = function() { + that.removeElement = function() { Ox.forEach(that.submenus, function(submenu) { submenu.remove(); }); - self.superRemove(); + return Ox.Element.prototype.removeElement.apply(that, arguments); }; /*@