Backporting for LTS 2.516.1 (part 2) (#10822)
Label conflicting PRs / main (push) Has been cancelled Details

This commit is contained in:
Mark Waite 2025-07-10 08:18:53 -06:00 committed by GitHub
commit fe37c57d58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 15 additions and 9 deletions

View File

@ -36,15 +36,21 @@ function dropdown() {
animation: "dropdown", animation: "dropdown",
duration: 250, duration: 250,
onShow: (instance) => { onShow: (instance) => {
// Make sure only one instance is visible at all times // Make sure only one instance is visible at all times in case of breadcrumb
const dropdowns = document.querySelectorAll("[data-tippy-root]"); if (
Array.from(dropdowns).forEach((element) => { instance.reference.classList.contains("hoverable-model-link") ||
// Check if the Tippy.js instance exists instance.reference.classList.contains("hoverable-children-model-link")
if (element && element._tippy) { ) {
// To just hide the dropdown const dropdowns = document.querySelectorAll("[data-tippy-root]");
element._tippy.hide(); Array.from(dropdowns).forEach((element) => {
} // Check if the Tippy.js instance exists
}); if (element && element._tippy) {
// To just hide the dropdown
element._tippy.hide();
}
});
}
const referenceParent = instance.reference.parentNode; const referenceParent = instance.reference.parentNode;
if (referenceParent.classList.contains("model-link")) { if (referenceParent.classList.contains("model-link")) {