@txstate-mws/svelte-components 1.5.9 → 1.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -76,8 +76,6 @@ async function reactToItems(..._) {
|
|
|
76
76
|
lastactive = items.length - [...items].reverse().findIndex(itm => 'value' in itm && !itm.disabled && !hiddenItem(itm)) - 1;
|
|
77
77
|
if (hilited && items[hilited]?.disabled)
|
|
78
78
|
hilited = firstactive;
|
|
79
|
-
if (document.activeElement === buttonelement && hasMeaningfulItems && !loading)
|
|
80
|
-
menushown = true;
|
|
81
79
|
}
|
|
82
80
|
$: void reactToItems(items, value);
|
|
83
81
|
async function reactToMenuShown(_) {
|
|
@@ -219,6 +217,10 @@ function onblur(e) {
|
|
|
219
217
|
menushown = false; });
|
|
220
218
|
}
|
|
221
219
|
}
|
|
220
|
+
function oninput(e) {
|
|
221
|
+
if (document.activeElement === buttonelement)
|
|
222
|
+
menushown = true;
|
|
223
|
+
}
|
|
222
224
|
function cleanup(element) {
|
|
223
225
|
for (const observer of observers)
|
|
224
226
|
observer.disconnect();
|
|
@@ -227,6 +229,7 @@ function cleanup(element) {
|
|
|
227
229
|
element.removeEventListener('click', onbuttonclick);
|
|
228
230
|
element.removeEventListener('keydown', onkeydown);
|
|
229
231
|
element.removeEventListener('blur', onblur);
|
|
232
|
+
element.removeEventListener('input', oninput);
|
|
230
233
|
element.removeAttribute('aria-disabled');
|
|
231
234
|
element.removeAttribute('aria-haspopup');
|
|
232
235
|
element.removeAttribute('aria-expanded');
|