From 912e64559b3f6bff7af3b1674e691bc5b6ff9770 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Thu, 10 Sep 2020 03:04:47 -0400 Subject: [PATCH] don't autocomplete on mouseover (furbooru/philomena#15) --- assets/js/autocomplete.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/assets/js/autocomplete.js b/assets/js/autocomplete.js index b5e4d5de..be3d55d3 100644 --- a/assets/js/autocomplete.js +++ b/assets/js/autocomplete.js @@ -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: {