Skip to content

Commit

Permalink
fixed being unable to place the cursor at the end of a multi-line text
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoenig committed Nov 12, 2020
1 parent 97557cc commit b537f9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions morphic.js
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@

/*global window, HTMLCanvasElement, FileReader, Audio, FileList, Map*/

var morphicVersion = '2020-November-02';
var morphicVersion = '2020-November-12';
var modules = {}; // keep track of additional loaded modules
var useBlurredShadows = true;

Expand Down Expand Up @@ -9438,7 +9438,7 @@ TextMorph.prototype.slotAt = function (aPoint) {
charX = 0;
}
columnLength = this.lines[row - 1].length;
while (col < columnLength - 2 && aPoint.x - this.left() > charX) {
while (col < columnLength - 1 && aPoint.x - this.left() > charX) {
charX += ctx.measureText(this.lines[row - 1][col]).width;
col += 1;
}
Expand Down

0 comments on commit b537f9e

Please sign in to comment.