Update style using element.style.cssText instead of element.cssText

This commit is contained in:
Gaspar 2016-08-11 12:32:06 +02:00
parent dca217f379
commit f0082473f9

View file

@ -441,11 +441,11 @@ module.exports = function($window) {
//style
function updateStyle(element, old, style) {
if (old === style) element.cssText = "", old = null
if (style == null) element.cssText = ""
else if (typeof style === "string") element.cssText = style
if (old === style) element.style.cssText = "", old = null
if (style == null) element.style.cssText = ""
else if (typeof style === "string") element.style.cssText = style
else {
if (typeof old === "string") element.cssText = ""
if (typeof old === "string") element.style.cssText = ""
for (var key in style) {
element.style[key] = style[key]
}