Skip to content

Commit

Permalink
🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Aug 31, 2023
1 parent 8212a5c commit b1a27f8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/src/search/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,10 @@ export const openSearchAsset = (element: Element, isStick: boolean) => {
searchInputElement.value = historyElement.querySelector(".b3-list-item--focus").textContent.trim();
assetInputEvent(element, localSearch);
toggleAssetHistory(historyElement, searchInputElement);
renderPreview(previewElement, currentList.dataset.id, searchInputElement.value, localSearch.method);
}
event.preventDefault();
return;
}
if (event.key === "ArrowDown" && event.altKey) {
toggleAssetHistory(historyElement, searchInputElement);
Expand Down Expand Up @@ -175,7 +177,10 @@ export const openSearchAsset = (element: Element, isStick: boolean) => {
searchPanelElement.scrollTop = currentList.offsetTop - searchPanelElement.clientHeight + lineHeight;
}
event.preventDefault();
} else if (event.key === "ArrowUp") {
renderPreview(previewElement, currentList.dataset.id, searchInputElement.value, localSearch.method);
return;
}
if (event.key === "ArrowUp") {
currentList.classList.remove("b3-list-item--focus");
if (!currentList.previousElementSibling) {
searchPanelElement.lastElementChild.classList.add("b3-list-item--focus");
Expand All @@ -188,8 +193,8 @@ export const openSearchAsset = (element: Element, isStick: boolean) => {
searchPanelElement.scrollTop = currentList.offsetTop - lineHeight * 2;
}
event.preventDefault();
renderPreview(previewElement, currentList.dataset.id, searchInputElement.value, localSearch.method);
}
renderPreview(previewElement, currentList.dataset.id, searchInputElement.value, localSearch.method);
});
assetInputEvent(element, localSearch);

Expand Down

0 comments on commit b1a27f8

Please sign in to comment.