File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
import $ from 'jquery' ;
2
2
import { updateIssuesMeta } from './repo-issue.js' ;
3
- import { toggleElem , hideElem } from '../utils/dom.js' ;
3
+ import { toggleElem , hideElem , isElemHidden } from '../utils/dom.js' ;
4
4
import { htmlEscape } from 'escape-goat' ;
5
5
import { confirmModal } from './comp/ConfirmModal.js' ;
6
6
import { showErrorToast } from '../modules/toast.js' ;
@@ -30,7 +30,10 @@ function initRepoIssueListCheckboxes() {
30
30
toggleElem ( $ ( '#issue-filters' ) , ! anyChecked ) ;
31
31
toggleElem ( $ ( '#issue-actions' ) , anyChecked ) ;
32
32
// there are two panels but only one select-all checkbox, so move the checkbox to the visible panel
33
- $ ( '#issue-filters, #issue-actions' ) . filter ( ':visible' ) . find ( '.issue-list-toolbar-left' ) . prepend ( issueSelectAll ) ;
33
+ const panels = document . querySelectorAll ( '#issue-filters, #issue-actions' ) ;
34
+ const visiblePanel = Array . from ( panels ) . find ( ( el ) => ! isElemHidden ( el ) ) ;
35
+ const toolbarLeft = visiblePanel . querySelector ( '.issue-list-toolbar-left' ) ;
36
+ toolbarLeft . prepend ( issueSelectAll ) ;
34
37
} ;
35
38
36
39
for ( const el of issueCheckboxes ) {
You can’t perform that action at this time.
0 commit comments