dataset on SVG doesn't work in Chrome 49
This commit is contained in:
parent
1572a0fbfe
commit
a11fca48fb
|
@ -70,7 +70,9 @@ function initGlobalEvents() {
|
||||||
window.onbeforeunload = rememberScrollPosition;
|
window.onbeforeunload = rememberScrollPosition;
|
||||||
|
|
||||||
$$('[data-toggle-on-click]').forEach(el => {
|
$$('[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'));
|
enforceInputRange($('#manage.newUI.targets'));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user