1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 10:29:54 +00:00

Fix copyStyles() not working in Firefox

Yet more browser incompatibilities to weep over…
This commit is contained in:
Jermolene 2016-05-09 14:11:08 -06:00
parent c8777ea012
commit e54cc7b211

View File

@ -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;
};