diff --git a/src/editor/components/seList.js b/src/editor/components/seList.js index 3e1504c3..8f0b393a 100644 --- a/src/editor/components/seList.js +++ b/src/editor/components/seList.js @@ -125,7 +125,6 @@ export class SeList extends HTMLElement { connectedCallback () { const currentObj = this; this.$dropdown.addEventListener('selectedindexchange', (e) => { - e.preventDefault(); if (e?.detail?.selectedIndex !== undefined) { const value = this.$dropdown.selectedItem.getAttribute('value'); const closeEvent = new CustomEvent('change', { detail: { value } }); @@ -133,6 +132,12 @@ export class SeList extends HTMLElement { currentObj.value = value; } }); + this.$dropdown.addEventListener('close', (e) => { + /** @todo: with Chrome, selectedindexchange does not fire consistently + * unless you forec change in this close event + */ + this.$dropdown.selectedIndex = this.$dropdown.currentIndex; + }); } }