diff --git a/js/dom.js b/js/dom.js index db9d9f0f..4e40bc83 100644 --- a/js/dom.js +++ b/js/dom.js @@ -98,7 +98,11 @@ document.addEventListener('wheel', event => { return; } if (el.tagName === 'SELECT') { - el.selectedIndex = Math.max(0, Math.min(el.length - 1, el.selectedIndex + Math.sign(event.deltaY))); + const old = el.selectedIndex; + el.selectedIndex = Math.max(0, Math.min(el.length - 1, old + Math.sign(event.deltaY))); + if (el.selectedIndex !== old) { + el.dispatchEvent(new Event('change', {bubbles: true})); + } event.preventDefault(); } event.stopImmediatePropagation();