diff --git a/core/modules/utils/dom/dom.js b/core/modules/utils/dom/dom.js index ef08ec369..1b5b6a31c 100644 --- a/core/modules/utils/dom/dom.js +++ b/core/modules/utils/dom/dom.js @@ -209,8 +209,8 @@ Get the computed styles applied to an element as an array of strings of individu exports.getComputedStyles = function(domNode) { var textAreaStyles = window.getComputedStyle(domNode,null), styleDefs = []; - $tw.utils.each(Object.keys(textAreaStyles),function(name) { - styleDefs.push(name + ": " + textAreaStyles[name] + ";"); + $tw.utils.each(textAreaStyles,function(name,index) { + styleDefs.push(name + ": " + textAreaStyles.getPropertyValue(name) + ";"); }); return styleDefs; };