changed select eventListeners from "input" to "change" (#318)

Although not an issue for most modern browsers, Microsoft Edge does not register "input" events on select Elements.

Bugfix for issue #315. https://github.com/Azgaar/Fantasy-Map-Generator/issues/315
This commit is contained in:
floookay 2019-10-03 13:36:10 +02:00 committed by Azgaar
parent 8ff1fe46b8
commit b4dcfec86e
3 changed files with 7 additions and 3 deletions

View file

@ -120,7 +120,7 @@ function editReligions() {
body.querySelectorAll("div.states").forEach(el => el.addEventListener("click", selectReligionOnLineClick));
body.querySelectorAll("rect.zoneFill").forEach(el => el.addEventListener("click", religionChangeColor));
body.querySelectorAll("div > input.religionName").forEach(el => el.addEventListener("input", religionChangeName));
body.querySelectorAll("div > select.religionType").forEach(el => el.addEventListener("input", religionChangeType));
body.querySelectorAll("div > select.religionType").forEach(el => el.addEventListener("change", religionChangeType));
body.querySelectorAll("div > input.religionForm").forEach(el => el.addEventListener("input", religionChangeForm));
body.querySelectorAll("div > input.religionDeity").forEach(el => el.addEventListener("input", religionChangeDeity));
body.querySelectorAll("div > span.icon-arrows-cw").forEach(el => el.addEventListener("click", regenerateDeity));