summaryrefslogtreecommitdiff
path: root/blocks.js
diff options
context:
space:
mode:
authorJens Mönig <jens@moenig.org>2015-05-01 11:55:33 -0400
committerJens Mönig <jens@moenig.org>2015-05-01 11:55:33 -0400
commit4d5b9ca135233a23b556fd2f07e0ff6bd8a0bd74 (patch)
tree4e01e1b5e621e2c8f246983496ac2bd4f12367da /blocks.js
parent340f91b7f2c46e0068562935c7277054d779e1bf (diff)
downloadsnap-4d5b9ca135233a23b556fd2f07e0ff6bd8a0bd74.tar.gz
snap-4d5b9ca135233a23b556fd2f07e0ff6bd8a0bd74.zip
select all text when first clicking an input slot
Diffstat (limited to 'blocks.js')
-rw-r--r--blocks.js11
1 files changed, 10 insertions, 1 deletions
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();