IE10 does not support classList on SVG elements m(
This commit is contained in:
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
|
// on text area focus, generate identicon from IP address
|
||||||
$(".textarea-wrapper > textarea", el).on("focus", function() {
|
$(".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(
|
$(".avatar svg", el).replace(
|
||||||
lib.identicons.generate(lib.pbkdf2(api.remote_addr, api.salt, 1000, 6), 4, 48));
|
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);
|
].join(""), 2).toString(16);
|
||||||
|
|
||||||
var el = generateIdenticon(blank, height, width);
|
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;
|
return el;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user