From 4d5b9ca135233a23b556fd2f07e0ff6bd8a0bd74 Mon Sep 17 00:00:00 2001 From: Jens Mönig Date: Fri, 1 May 2015 11:55:33 -0400 Subject: select all text when first clicking an input slot --- blocks.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'blocks.js') diff --git a/blocks.js b/blocks.js index 45f1049..8049e59 100644 --- a/blocks.js +++ b/blocks.js @@ -155,7 +155,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph, Costume*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2015-March-23'; +modules.blocks = '2015-May-01'; var SyntaxElementMorph; @@ -7022,6 +7022,15 @@ InputSlotMorph.prototype.fixLayout = function () { // InputSlotMorph events: +InputSlotMorph.prototype.mouseDownLeft = function (pos) { + if (this.isReadOnly || this.arrow().bounds.containsPoint(pos)) { + this.escalateEvent('mouseDownLeft', pos); + } else { + this.contents().edit(); + this.contents().selectAll(); + } +}; + InputSlotMorph.prototype.mouseClickLeft = function (pos) { if (this.arrow().bounds.containsPoint(pos)) { this.dropDownMenu(); -- cgit v1.3.1