1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-24 22:33:16 +00:00

Partial fix for copyStyles problem under Chrome

There’s still a problem: in Chrome, the styling of the textarea
placeholder isn’t correct.
This commit is contained in:
Jermolene 2016-05-17 15:45:06 -06:00
parent 682b1e7027
commit f846a004b6

View File

@ -208,10 +208,12 @@ 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(textAreaStyles,function(name,index) {
styleDefs = [],
name;
for(var t=0; t<textAreaStyles.length; t++) {
name = textAreaStyles[t];
styleDefs.push(name + ": " + textAreaStyles.getPropertyValue(name) + ";");
});
}
return styleDefs;
};