Do not try to tab complete if search suggestions are disabled.

This commit is contained in:
Flo2410 2024-02-08 20:07:57 +00:00
parent c41f839a6a
commit 41b94bfa74
No known key found for this signature in database
GPG Key ID: 8ECB00AC5216DC7F

View File

@ -123,6 +123,10 @@ export default function Search({ options }) {
if (event.key === "Tab") {
event.preventDefault();
if (!(options.showSearchSuggestions && (selectedProvider.suggestionUrl || options.suggestionUrl))) {
return;
}
const list = document.getElementById("comboboxOptions").getElementsByTagName("li");
if (list.length === 0) {
return;