1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-07 22:33:50 +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) { exports.getComputedStyles = function(domNode) {
var textAreaStyles = window.getComputedStyle(domNode,null), var textAreaStyles = window.getComputedStyle(domNode,null),
styleDefs = []; styleDefs = [],
$tw.utils.each(textAreaStyles,function(name,index) { name;
for(var t=0; t<textAreaStyles.length; t++) {
name = textAreaStyles[t];
styleDefs.push(name + ": " + textAreaStyles.getPropertyValue(name) + ";"); styleDefs.push(name + ": " + textAreaStyles.getPropertyValue(name) + ";");
}); }
return styleDefs; return styleDefs;
}; };