Skip to content

Commit 5128610

Browse files
committed
webui: don't refresh if search is empty
1 parent 70de343 commit 5128610

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

webui/page/exclude.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@ function initExcludePage() {
215215
searchBar.classList.remove('show');
216216
document.querySelectorAll('.search-bg').forEach(el => el.classList.remove('hide'));
217217
searchQuery = '';
218-
searchInput.value = '';
219218
searchInput.blur();
220-
if (e && e.isTrusted) {
219+
if (e && e.isTrusted && searchInput.value !== '') {
220+
searchInput.value = '';
221221
renderAppList();
222222
}
223223
};

webui/page/kpm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ export function initKPMPage() {
237237
searchBar.classList.remove('show');
238238
document.querySelectorAll('.search-bg').forEach(el => el.classList.remove('hide'));
239239
searchQuery = '';
240-
searchInput.value = '';
241240
searchInput.blur();
242-
if (e && e.isTrusted) {
241+
if (e && e.isTrusted && searchInput.value !== '') {
242+
searchInput.value = '';
243243
renderKpmList();
244244
}
245245
};

0 commit comments

Comments
 (0)