select all on fresh input slot edit

dev
jmoenig 2016-10-24 12:27:02 +02:00
rodzic 5ec7ad4f36
commit d2d096deff
5 zmienionych plików z 22 dodań i 3 usunięć

Wyświetl plik

@ -149,7 +149,7 @@ isSnapObject, copy, PushButtonMorph, SpriteIconMorph, Process*/
// Global stuff ////////////////////////////////////////////////////////
modules.blocks = '2016-October-20';
modules.blocks = '2016-October-24';
var SyntaxElementMorph;
var BlockMorph;
@ -7572,6 +7572,10 @@ InputSlotMorph.prototype.reactToEdit = function () {
this.contents().clearSelection();
};
InputSlotMorph.prototype.freshTextEdit = function (aStringOrTextMorph) {
aStringOrTextMorph.selectAll();
};
// InputSlotMorph menu:
InputSlotMorph.prototype.userMenu = function () {

4
gui.js
Wyświetl plik

@ -72,7 +72,7 @@ isRetinaSupported, SliderMorph*/
// Global stuff ////////////////////////////////////////////////////////
modules.gui = '2016-October-10';
modules.gui = '2016-October-24';
// Declarations
@ -3088,8 +3088,10 @@ IDE_Morph.prototype.aboutSnap = function () {
+ '\nKartik Chandra: Paint Editor'
+ '\nMichael Ball: Time/Date UI, many bugfixes'
+ '\nBartosz Leper: Retina Display Support'
+ '\nBernat Romagosa: Countless contributions'
+ '\n"Ava" Yuan Yuan, Dylan Servilla: Graphic Effects'
+ '\nKyle Hotchkiss: Block search design'
+ '\nBrian Brol: Many bugfixes and optimizations'
+ '\nIan Reynolds: UI Design, Event Bindings, '
+ 'Sound primitives'
+ '\nIvan Motyashov: Initial Squeak Porting'

Wyświetl plik

@ -3080,3 +3080,9 @@ http://snap.berkeley.edu/run#cloud:Username=jens&ProjectName=rotation
161021
------
* Threads: Fixed #1422
161024
------
* Text Editing Tweaks, thanks, Bernat!!

Wyświetl plik

@ -10757,6 +10757,7 @@ WorldMorph.prototype.init = function (aCanvas, fillPage) {
this.hand = new HandMorph(this);
this.keyboardReceiver = null;
this.cursor = null;
this.lastEditedText = null;
this.activeMenu = null;
this.activeHandle = null;
this.virtualKeyboard = null;
@ -11537,6 +11538,11 @@ WorldMorph.prototype.edit = function (aStringOrTextMorph) {
this.slide(aStringOrTextMorph);
}
}
if (this.lastEditedText !== aStringOrTextMorph) {
aStringOrTextMorph.escalateEvent('freshTextEdit', aStringOrTextMorph);
}
this.lastEditedText = aStringOrTextMorph;
};
WorldMorph.prototype.slide = function (aStringOrTextMorph) {
@ -11593,6 +11599,7 @@ WorldMorph.prototype.stopEditing = function () {
document.body.removeChild(this.virtualKeyboard);
this.virtualKeyboard = null;
}
this.lastEditedText = null;
this.worldCanvas.focus();
};

Wyświetl plik

@ -61,7 +61,7 @@ normalizeCanvas*/
// Global stuff ////////////////////////////////////////////////////////
modules.store = '2016-August-03';
modules.store = '2016-October-24';
// XML_Serializer ///////////////////////////////////////////////////////