From c4968843e4129eb1b7355a20e6a5e72e67dea704 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Fri, 11 Jul 2014 17:59:16 +0200 Subject: fixed #508 (don’t popup empty menus) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit thanks, @cycomached! --- morphic.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'morphic.js') 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(); -- cgit v1.3.1