summaryrefslogtreecommitdiff
path: root/morphic.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2014-07-11 17:59:16 +0200
committerjmoenig <jens@moenig.org>2014-07-11 17:59:16 +0200
commitc4968843e4129eb1b7355a20e6a5e72e67dea704 (patch)
tree8c0b0d38242a561f07777793defe7d646baf55bc /morphic.js
parent98772028bb648317a8825090540f81f71ad0003e (diff)
downloadsnap-byow-c4968843e4129eb1b7355a20e6a5e72e67dea704.tar.gz
snap-byow-c4968843e4129eb1b7355a20e6a5e72e67dea704.zip
fixed #508 (don’t popup empty menus)
thanks, @cycomached!
Diffstat (limited to 'morphic.js')
-rw-r--r--morphic.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/morphic.js b/morphic.js
index 6d93439..39b8741 100644
--- a/morphic.js
+++ b/morphic.js
@@ -6893,6 +6893,9 @@ MenuMorph.prototype.popup = function (world, pos) {
if (world.activeMenu) {
world.activeMenu.destroy();
}
+ if (this.items.length < 1 && !this.title) { // don't show empty menus
+ return;
+ }
world.add(this);
world.activeMenu = this;
this.fullChanged();