Menu: patch removeElement, not remove

This commit is contained in:
rlx 2014-09-23 21:01:53 +02:00
parent ab6266f6fc
commit aa3a20bbc2

View file

@ -740,15 +740,13 @@ Ox.Menu = function(options, self) {
}; };
/*@ /*@
remove <f> remove removeElement <f> removeElement
() -> <o> remove menu
@*/ @*/
self.superRemove = that.remove.bind(that); that.removeElement = function() {
that.remove = function() {
Ox.forEach(that.submenus, function(submenu) { Ox.forEach(that.submenus, function(submenu) {
submenu.remove(); submenu.remove();
}); });
self.superRemove(); return Ox.Element.prototype.removeElement.apply(that, arguments);
}; };
/*@ /*@