diff --git a/build/media_source/templates/administrator/atum/js/template.es6.js b/build/media_source/templates/administrator/atum/js/template.es6.js index fe1266dba6a43..2e97ef31fc0b8 100644 --- a/build/media_source/templates/administrator/atum/js/template.es6.js +++ b/build/media_source/templates/administrator/atum/js/template.es6.js @@ -286,3 +286,20 @@ window.addEventListener('joomla:menu-toggle', (event) => { changeLogo(event.detail); } }); + +/** + * Close any open data-bs-toggle="collapse" when opening a data-bs-toggle="dropdown" + * + * @since 4.4 + */ +document.querySelectorAll('[data-bs-toggle="dropdown"]').forEach((button) => { + button.addEventListener('click', () => { + document.querySelectorAll('[data-bs-toggle="collapse"]').forEach((cb) => { + const target = document.querySelector(cb.getAttribute('data-bs-target')); + const collapseMenu = bootstrap.Collapse.getInstance(target) || new bootstrap.Collapse(target, { + toggle: false, + }); + collapseMenu.hide(); + }); + }); +}); diff --git a/build/media_source/templates/site/cassiopeia/scss/blocks/_header.scss b/build/media_source/templates/site/cassiopeia/scss/blocks/_header.scss index ece7792b12ba3..34271e4aa36ce 100644 --- a/build/media_source/templates/site/cassiopeia/scss/blocks/_header.scss +++ b/build/media_source/templates/site/cassiopeia/scss/blocks/_header.scss @@ -204,6 +204,10 @@ .fas { font-size: 1.5rem; } + + > * { + pointer-events: none; + } } .container-search { diff --git a/build/media_source/templates/site/cassiopeia/scss/blocks/_toolbar.scss b/build/media_source/templates/site/cassiopeia/scss/blocks/_toolbar.scss index 9ce695bdda44c..d9ca1c7652498 100644 --- a/build/media_source/templates/site/cassiopeia/scss/blocks/_toolbar.scss +++ b/build/media_source/templates/site/cassiopeia/scss/blocks/_toolbar.scss @@ -119,6 +119,10 @@ &.btn { padding-inline-end: 0; } + + > * { + pointer-events: none; + } } .btn-group:not(:last-child) > .dropdown-toggle-split {