IE10 does not support classList on SVG elements m(

legacy/0.2
Martin Zimmermann 11 years ago
parent 32f83160d6
commit 1518bae5ba

@ -16,7 +16,7 @@ define(["app/text/html", "app/dom", "app/utils", "app/api", "app/markup", "app/i
// on text area focus, generate identicon from IP address
$(".textarea-wrapper > textarea", el).on("focus", function() {
if ($(".avatar svg", el).classList.contains("blank")) {
if ($(".avatar svg", el).getAttribute("className") === "blank") {
$(".avatar svg", el).replace(
lib.identicons.generate(lib.pbkdf2(api.remote_addr, api.salt, 1000, 6), 4, 48));
}

@ -111,7 +111,7 @@ define(["q"], function(Q) {
].join(""), 2).toString(16);
var el = generateIdenticon(blank, height, width);
el.classList.add("blank");
el.setAttribute("className", "blank"); // IE10 does not support classList on SVG elements, duh.
return el;
};

Loading…
Cancel
Save