diff --git a/editor/js/ui/common/menu.js b/editor/js/ui/common/menu.js index 6f803a659..584baf5a4 100644 --- a/editor/js/ui/common/menu.js +++ b/editor/js/ui/common/menu.js @@ -92,7 +92,8 @@ RED.menu = (function() { menuItems[opt.id] = opt; if (opt.onselect) { - link.click(function() { + link.click(function(e) { + e.preventDefault(); if ($(this).parent().hasClass("disabled")) { return; } @@ -150,15 +151,13 @@ RED.menu = (function() { } function createMenu(options) { - var button = $("#"+options.id); + var menuParent = $("#"+options.id); - //button.click(function(event) { - // $("#"+options.id+"-submenu").show(); - // event.preventDefault(); - //}); + var topMenu = $("