From ec6c5a952fd16ce67ef6a6dc36a3372010fb6e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20M=C3=B6nig?= Date: Tue, 5 Jul 2016 09:19:51 +0200 Subject: [PATCH] fixed #1247 prevent multi-args from expanding / collapsing in the palette --- blocks.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/blocks.js b/blocks.js index 3af8bb3c..ad1587b6 100644 --- a/blocks.js +++ b/blocks.js @@ -149,7 +149,7 @@ isSnapObject, copy, PushButtonMorph, SpriteIconMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2016-July-04'; +modules.blocks = '2016-July-05'; var SyntaxElementMorph; var BlockMorph; @@ -10357,6 +10357,13 @@ MultiArgMorph.prototype.removeInput = function () { // MultiArgMorph events: MultiArgMorph.prototype.mouseClickLeft = function (pos) { + // prevent expansion in the palette + // (because it can be hard or impossible to collapse again) + if (this.parentThatIsA(BlockMorph).isTemplate && + !this.parentThatIsA(ScriptsMorph)) { + this.escalateEvent('mouseClickLeft', pos); + return; + } // if the key is pressed, repeat action 5 times var arrows = this.arrows(), leftArrow = arrows.children[0],