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 11import $ from 'jquery' ;
22import { updateIssuesMeta } from './repo-issue.js' ;
3- import { toggleElem , hideElem } from '../utils/dom.js' ;
3+ import { toggleElem , hideElem , isElemHidden } from '../utils/dom.js' ;
44import { htmlEscape } from 'escape-goat' ;
55import { confirmModal } from './comp/ConfirmModal.js' ;
66import { showErrorToast } from '../modules/toast.js' ;
@@ -30,7 +30,10 @@ function initRepoIssueListCheckboxes() {
3030 toggleElem ( $ ( '#issue-filters' ) , ! anyChecked ) ;
3131 toggleElem ( $ ( '#issue-actions' ) , anyChecked ) ;
3232 // 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 ) ;
3437 } ;
3538
3639 for ( const el of issueCheckboxes ) {
You can’t perform that action at this time.
0 commit comments