Skip to content

Commit

Permalink
fix(fabric.IText): copy style in non full mode when typing text (fabr…
Browse files Browse the repository at this point in the history
  • Loading branch information
asturur authored and shanicerae committed Jan 16, 2021
1 parent 4cd4ab7 commit 6f35308
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mixins/itext_key_behavior.mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
// let's copy some style before deleting.
// we want to copy the style before the cursor OR the style at the cursor if selection
// is bigger than 0.
copiedStyle = this.getSelectionStyles(selectionStart, selectionStart + 1, true);
copiedStyle = this.getSelectionStyles(selectionStart, selectionStart + 1, false);
// now duplicate the style one for each inserted text.
copiedStyle = insertedText.map(function() {
// this return an array of references, but that is fine since we are
Expand Down

0 comments on commit 6f35308

Please sign in to comment.