save new state anyway (#3595)

This commit is contained in:
Andrea Bogazzi 2016-12-28 11:50:48 +01:00 committed by GitHub
parent e72881bb6d
commit 9bb820ed75
2 changed files with 3 additions and 7 deletions

View file

@ -616,6 +616,7 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
this._removeCharsFromTo(this.selectionStart, this.selectionEnd);
}
this.set('dirty', true);
this.setSelectionEnd(this.selectionStart);
this._removeExtraneousStyles();

View file

@ -713,13 +713,8 @@
* @private
*/
_shouldClearDimensionCache: function() {
var shouldClear = false;
if (this._forceClearCache) {
this._forceClearCache = false;
this.dirty = true;
return true;
}
shouldClear = this.hasStateChanged('_dimensionAffectingProps');
var shouldClear = this._forceClearCache;
shouldClear || (shouldClear = this.hasStateChanged('_dimensionAffectingProps'));
if (shouldClear) {
this.saveState({ propertySet: '_dimensionAffectingProps' });
this.dirty = true;