Menu: patch removeElement, not remove
This commit is contained in:
parent
ab6266f6fc
commit
aa3a20bbc2
1 changed files with 3 additions and 5 deletions
|
@ -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);
|
||||
};
|
||||
|
||||
/*@
|
||||
|
|
Loading…
Reference in a new issue