diff --git a/templates/add_account.html b/templates/add_account.html
index dbd0834..a0e445c 100644
--- a/templates/add_account.html
+++ b/templates/add_account.html
@@ -124,6 +124,10 @@
list: data
});
+ streamInput.addEventListener('awesomplete-selectcomplete', function(event) {
+ this.value = event.text.value;
+ });
+
{% if text_input_enabled %}
const accountDetailsTextarea = document.getElementById('accountDetails');
if (accountDetailsTextarea) {
@@ -142,17 +146,9 @@
document.getElementById('password').value = passwordLine.substring(5).trim();
}
- if (awesomplete && streamName) {
- const streamList = awesomplete.list;
- // Find best match
- const match = streamList.find(item => item.toLowerCase().includes(streamName.toLowerCase()));
- if (match) {
- streamInput.value = match;
- } else {
- streamInput.value = streamName;
- }
- } else if (streamName) {
+ if (streamName) {
streamInput.value = streamName;
+ awesomplete.evaluate();
}
});
}