mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-20 06:37:59 +01:00
don't autocomplete on mouseover (furbooru/philomena#15)
This commit is contained in:
parent
fd4843a39b
commit
912e64559b
1 changed files with 1 additions and 2 deletions
|
@ -54,15 +54,14 @@ function createItem(list, suggestion) {
|
||||||
item.addEventListener('mouseover', () => {
|
item.addEventListener('mouseover', () => {
|
||||||
removeSelected();
|
removeSelected();
|
||||||
item.classList.add('autocomplete__item--selected');
|
item.classList.add('autocomplete__item--selected');
|
||||||
inputField.value = item.dataset.value;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
item.addEventListener('mouseout', () => {
|
item.addEventListener('mouseout', () => {
|
||||||
inputField.value = originalTerm;
|
|
||||||
removeSelected();
|
removeSelected();
|
||||||
});
|
});
|
||||||
|
|
||||||
item.addEventListener('click', () => {
|
item.addEventListener('click', () => {
|
||||||
|
inputField.value = item.dataset.value;
|
||||||
inputField.dispatchEvent(
|
inputField.dispatchEvent(
|
||||||
new CustomEvent('autocomplete', {
|
new CustomEvent('autocomplete', {
|
||||||
detail: {
|
detail: {
|
||||||
|
|
Loading…
Reference in a new issue