Disable Incremental Search for Images on Web

Bug introduced in commit da118b3fed
This commit is contained in:
Debanjum Singh Solanky 2022-08-03 11:52:51 +03:00
parent 26b50471b7
commit f642450ed9

View file

@ -78,8 +78,15 @@
} }
function incremental_search(event) { function incremental_search(event) {
// perform incremental search by default, rerank results if user presses enter type = document.getElementById("type").value;
event.key === 'Enter' ? search(rerank=true) : search(rerank=false); // Search with reranking on 'Enter'
if (event.key === 'Enter') {
search(rerank=true);
}
// Limit incremental search to text types
else if (type !== "image") {
search(rerank=false);
}
} }
function populate_type_dropdown() { function populate_type_dropdown() {