diff options
| author | Jens Mönig <jens@moenig.org> | 2015-05-01 11:53:42 -0400 |
|---|---|---|
| committer | Jens Mönig <jens@moenig.org> | 2015-05-01 11:53:42 -0400 |
| commit | 585d1541b8ce45ba2be1367ab4ddac1b9a1095d6 (patch) | |
| tree | 6f88a1188d39e6f60a68c46323c7e5490d7a13ce /blocks.js | |
| parent | 30e43a359e5ba1a7ec3c6ab331e8f9ec7e43ca7e (diff) | |
| download | snap-585d1541b8ce45ba2be1367ab4ddac1b9a1095d6.tar.gz snap-585d1541b8ce45ba2be1367ab4ddac1b9a1095d6.zip | |
select all text when first clicking an input slot
Diffstat (limited to 'blocks.js')
| -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-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(); |
