From 4ac45d5cd608e7c25c6ab9fb2549096cbb870e98 Mon Sep 17 00:00:00 2001 From: "Evan W. Patton" Date: Sat, 16 Jun 2018 22:35:53 -0400 Subject: [PATCH] Add ability to have custom menus in flyouts --- core/block_svg.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/block_svg.js b/core/block_svg.js index 056cb8052..0f5f51546 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -889,6 +889,10 @@ Blockly.BlockSvg.prototype.showContextMenu_ = function(e) { this.customContextMenu(menuOptions); } + if (this.flyoutCustomContextMenu && block.isInFlyout) { + this.flyoutCustomContextMenu(menuOptions); + } + Blockly.ContextMenu.show(e, menuOptions, this.RTL); Blockly.ContextMenu.currentBlock = this; };