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
() -> <o> remove menu
removeElement <f> 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);
};
/*@