don't autocomplete on mouseover (furbooru/philomena#15)

This commit is contained in:
byte[] 2020-09-10 03:04:47 -04:00
parent fd4843a39b
commit 912e64559b

View file

@ -54,15 +54,14 @@ function createItem(list, suggestion) {
item.addEventListener('mouseover', () => {
removeSelected();
item.classList.add('autocomplete__item--selected');
inputField.value = item.dataset.value;
});
item.addEventListener('mouseout', () => {
inputField.value = originalTerm;
removeSelected();
});
item.addEventListener('click', () => {
inputField.value = item.dataset.value;
inputField.dispatchEvent(
new CustomEvent('autocomplete', {
detail: {