Fix search function behavior when filter is active

This commit is contained in:
Woody 2023-11-24 13:04:29 +01:00
parent 155c12f657
commit 698f5f951e
No known key found for this signature in database
GPG Key ID: 9872D7F5072789B2

View File

@ -2722,10 +2722,13 @@ function search(f,l=null)
if (!l) return;
// clear filter if searching in fxlist
if (l === 'fxlist' && f === document.activeElement) {
if (l === 'fxlist' && f.value !== '') {
gId("filters").querySelectorAll("input[type=checkbox]").forEach((e)=>{e.checked=false;});
}
// do not search if filter is active
if (gId("filters").querySelectorAll("input[type=checkbox]:checked").length) return;
var el = gId(l).querySelectorAll('.lstI');
// filter list items but leave (Default & Solid) always visible
for (i = (l==='pcont'?0:1); i < el.length; i++) {