Merge pull request #2223 from asturur/master

Fix deleting forward at end of text.
This commit is contained in:
Juriy Zaytsev 2015-05-21 11:51:14 -04:00
commit 4c2dd702d3

View file

@ -81,6 +81,9 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
*/
forwardDelete: function(e) {
if (this.selectionStart === this.selectionEnd) {
if (this.selectionStart === this.text.length) {
return;
}
this.moveCursorRight(e);
}
this.removeChars(e);