diff options
| author | Jens Mönig <jens@moenig.org> | 2015-05-01 11:55:33 -0400 |
|---|---|---|
| committer | Jens Mönig <jens@moenig.org> | 2015-05-01 11:55:33 -0400 |
| commit | 4d5b9ca135233a23b556fd2f07e0ff6bd8a0bd74 (patch) | |
| tree | 4e01e1b5e621e2c8f246983496ac2bd4f12367da | |
| parent | 340f91b7f2c46e0068562935c7277054d779e1bf (diff) | |
| download | snap-4d5b9ca135233a23b556fd2f07e0ff6bd8a0bd74.tar.gz snap-4d5b9ca135233a23b556fd2f07e0ff6bd8a0bd74.zip | |
select all text when first clicking an input slot
| -rw-r--r-- | blocks.js | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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(); |
