1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-25 23:03:15 +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) { exports.getComputedStyles = function(domNode) {
var textAreaStyles = window.getComputedStyle(domNode,null), var textAreaStyles = window.getComputedStyle(domNode,null),
styleDefs = []; styleDefs = [];
$tw.utils.each(Object.keys(textAreaStyles),function(name) { $tw.utils.each(textAreaStyles,function(name,index) {
styleDefs.push(name + ": " + textAreaStyles[name] + ";"); styleDefs.push(name + ": " + textAreaStyles.getPropertyValue(name) + ";");
}); });
return styleDefs; return styleDefs;
}; };