mirror of https://github.com/gorhill/uBlock.git
In search-mode, select only search-matched descendants
Context: "Filter lists" pane.
This commit is contained in:
parent
0fa4cae4b2
commit
d6eacd8cf6
|
@ -378,8 +378,11 @@ const toggleFilterList = (elem, on, ui = false) => {
|
|||
input.checked = on;
|
||||
dom.cl.toggle(listEntry, 'checked', on);
|
||||
dom.cl.toggle(listEntry, 'stickied', ui && !on);
|
||||
// Select/unselect descendants
|
||||
const childListEntries = qsa$(listEntry, '.listEntry');
|
||||
// Select/unselect descendants. Twist: if in search-mode, select only
|
||||
// search-matched descendants.
|
||||
const childListEntries = dom.cl.has('#lists', 'searchMode')
|
||||
? qsa$(listEntry, '.listEntry.searchMatch')
|
||||
: qsa$(listEntry, '.listEntry');
|
||||
for ( const descendantList of childListEntries ) {
|
||||
dom.cl.toggle(descendantList, 'checked', on);
|
||||
qs$(descendantList, ':scope > .detailbar input').checked = on;
|
||||
|
|
Loading…
Reference in New Issue