From 5ddcce56878e3cac272050b73611f4ed02aa9c30 Mon Sep 17 00:00:00 2001 From: mbrzuzy Date: Wed, 8 Jul 2015 16:19:04 -0400 Subject: [PATCH] Fix errors made when porting over IE9 Fix - When fix was added, I was still referencing element.textContent instead of the modified textContent --- src/shapes/text.class.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shapes/text.class.js b/src/shapes/text.class.js index 1c74e483..8176d81b 100644 --- a/src/shapes/text.class.js +++ b/src/shapes/text.class.js @@ -1054,9 +1054,9 @@ textContent = element.textContent; } - textContent = element.textContent.replace(/^\s+|\s+$|\n+/g, '').replace(/\s+/g, ' '); + textContent = textContent.replace(/^\s+|\s+$|\n+/g, '').replace(/\s+/g, ' '); - var text = new fabric.Text(textContent, options); + var text = new fabric.Text(textContent, options), /* Adjust positioning: x/y attributes in SVG correspond to the bottom-left corner of text bounding box