mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-01 17:47:32 +00:00
Unhyphenate CSS property names when rendering to the DOM
Annoyingly, Chrome will happily accept `background-color` and `backgroundColor` interchangeably, so I hadn't noticed that this was broken...
This commit is contained in:
@@ -96,7 +96,7 @@ Element.prototype.renderInDom = function(parentDomNode,insertBefore) {
|
||||
element.className = v.join(" ");
|
||||
} else if (typeof v === "object") { // ...or objects other than style?
|
||||
for(var p in v) {
|
||||
element.style[p] = v[p];
|
||||
element.style[$tw.utils.unHyphenateCss(p)] = v[p];
|
||||
}
|
||||
} else {
|
||||
element.setAttribute(a,v);
|
||||
|
||||
Reference in New Issue
Block a user