Merge pull request #2214 from asturur/itext-cursorposition

Fix cursor postion click on end of line
This commit is contained in:
Juriy Zaytsev 2015-05-19 19:01:11 -04:00
commit d2600f47c8

View file

@ -219,8 +219,9 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
}
if (mouseOffset.y < height) {
//this happens just on end of lines.
return this._getNewSelectionStartFromOffset(
mouseOffset, prevWidth, width, charIndex + i, jlen);
mouseOffset, prevWidth, width, charIndex + i - 1, jlen);
}
}