From a11fca48fbe869bb83727f4c0702528ee4432b06 Mon Sep 17 00:00:00 2001 From: tophf Date: Tue, 18 Apr 2017 21:38:22 +0300 Subject: [PATCH] dataset on SVG doesn't work in Chrome 49 --- manage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/manage.js b/manage.js index 6a0467b1..58e03b50 100644 --- a/manage.js +++ b/manage.js @@ -70,7 +70,9 @@ function initGlobalEvents() { window.onbeforeunload = rememberScrollPosition; $$('[data-toggle-on-click]').forEach(el => { - el.onclick = () => $(el.dataset.toggleOnClick).classList.toggle('hidden'); + // dataset on SVG doesn't work in Chrome 49-??, works in 57+ + const target = $(el.getAttribute('data-toggle-on-click')); + el.onclick = () => target.classList.toggle('hidden'); }); enforceInputRange($('#manage.newUI.targets'));