Only switch to themes on buttons that have the `theme` class
Fixes #1649
This commit is contained in:
parent
93008cf20b
commit
4251d7a838
|
@ -371,7 +371,14 @@ function playground_text(playground) {
|
||||||
});
|
});
|
||||||
|
|
||||||
themePopup.addEventListener('click', function (e) {
|
themePopup.addEventListener('click', function (e) {
|
||||||
var theme = e.target.id || e.target.parentElement.id;
|
var theme;
|
||||||
|
if (e.target.className === "theme") {
|
||||||
|
theme = e.target.id;
|
||||||
|
} else if (e.target.parentElement.className === "theme") {
|
||||||
|
theme = e.target.parentElement.id;
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
set_theme(theme);
|
set_theme(theme);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue