Fix slow clicks (> 100 ms) focusing previously-deselected IText.

This commit is contained in:
Jim Rodovich 2014-05-27 15:44:58 -05:00
parent 7fad64242c
commit 7e8dc3a91f

View file

@ -33,6 +33,7 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
this.__lastClickTime = this.__newClickTime;
this.__lastPointer = newPointer;
this.__lastIsEditing = this.isEditing;
this.__lastSelected = this.selected;
},
isDoubleClick: function(newPointer) {
@ -144,7 +145,7 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
this.__isMousedown = false;
if (this._isObjectMoved(options.e)) return;
if (this.selected) {
if (this.__lastSelected) {
this.enterEditing();
this.initDelayedCursor(true);
}