summaryrefslogtreecommitdiff
path: root/blocks.js
diff options
context:
space:
mode:
authorJens Mönig <jens@moenig.org>2015-05-01 11:53:42 -0400
committerJens Mönig <jens@moenig.org>2015-05-01 11:53:42 -0400
commit585d1541b8ce45ba2be1367ab4ddac1b9a1095d6 (patch)
tree6f88a1188d39e6f60a68c46323c7e5490d7a13ce /blocks.js
parent30e43a359e5ba1a7ec3c6ab331e8f9ec7e43ca7e (diff)
downloadsnap-585d1541b8ce45ba2be1367ab4ddac1b9a1095d6.tar.gz
snap-585d1541b8ce45ba2be1367ab4ddac1b9a1095d6.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 aef09da..8e428d0 100644
--- a/blocks.js
+++ b/blocks.js
@@ -155,7 +155,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph, Costume*/
// Global stuff ////////////////////////////////////////////////////////
-modules.blocks = '2015-March-09';
+modules.blocks = '2015-May-01';
var SyntaxElementMorph;
@@ -6987,6 +6987,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();