From a3a3bc5ffcd0fd14b5fa403e4193af4583924ecd Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 28 Aug 2024 18:22:20 +0800 Subject: [PATCH] bugfix --- bricks/menu.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bricks/menu.js b/bricks/menu.js index d87febe..3218dd7 100755 --- a/bricks/menu.js +++ b/bricks/menu.js @@ -12,6 +12,7 @@ bricks.Menu = class extends bricks.VBox { this.dom_element.style.display = ""; this.dom_element.style.backgroundColor = options.bgcolor || "white"; this.create_children(this, this.opts.items); + this.bind('item_click', this.menu_clicked.bind(this)); } create_submenu_container(){ let cp = new bricks.VBox({}); @@ -89,8 +90,8 @@ bricks.Menu = class extends bricks.VBox { w[k] = item[k]; } } - iw.bind('click', this.regen_menuitem_event.bind(this, item)); - tw.bind('click', this.regen_menuitem_event.bind(this, item)); + // iw.bind('click', this.regen_menuitem_event.bind(this, item)); + // tw.bind('click', this.regen_menuitem_event.bind(this, item)); iw.menuitem = w; tw.menuitem = w; w.set_css(this.menuitem_css || 'menuitem');