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
|
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);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
|
|
Loading…
Reference in a new issue