Merge pull request #1845 from bromagosa/dev

fixes #1799
upd4.1
Jens Mönig 2017-09-01 11:46:24 +02:00 zatwierdzone przez GitHub
commit 3d6e3935bd
1 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -8548,15 +8548,18 @@ StringMorph.prototype.mouseDoubleClick = function (pos) {
slot -= 1;
}
if (isWordChar(this.text[slot])) {
if (this.text[slot] && isWordChar(this.text[slot])) {
this.selectWordAt(slot);
} else {
} else if (this.text[slot]) {
this.selectBetweenWordsAt(slot);
} else {
// special case for when we click right after the
// last slot in multi line TextMorphs
this.selectAll();
}
} else {
this.escalateEvent('mouseDoubleClick', pos);
}
};
StringMorph.prototype.selectWordAt = function (slot) {