Widget: DCTList: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 538: | Line 538: | ||
// Close filter pane when clicked outside of it. | // Close filter pane when clicked outside of it. | ||
document.body.addEventListener('click', | document.body.addEventListener('click', event => { | ||
const filterPane = document.getElementById('dct-filters'); | const filterPane = document.getElementById('dct-filters'); | ||
if (!filterPane.contains(event.target) | if ( | ||
filterPane.classList.contains('open') && | |||
!filterPane.contains(event.target) && | |||
event.target !== document.querySelector('#filter-bar .large-button') | |||
) { filterPane.classList.remove('open'); } | ) { filterPane.classList.remove('open'); } | ||
}, { passive: true }); | }, { passive: true }); |
Revision as of 16:28, 6 September 2022
Development verstion of the DCT List.
Not ready for production!