N°8834 - Add compatibility with PHP 8.4 (#819)

* N°8834 - Add compatibility with PHP 8.4

* Rollback of scssphp/scssphp version upgrade due to compilation error
This commit is contained in:
Lenaick
2026-02-26 10:36:32 +01:00
committed by GitHub
parent d4821b7edc
commit fc967c06ce
961 changed files with 12298 additions and 7130 deletions

View File

@@ -75,7 +75,7 @@
}
tab.addEventListener('click', function(e) {
const activeTab = e.target || e.srcElement;
let activeTab = e.target || e.srcElement;
/* needed because when the tab contains HTML contents, user can click */
/* on any of those elements instead of their parent '<button>' element */
@@ -122,6 +122,12 @@
}
toggle.addEventListener('click', (e) => {
const toggle = e.currentTarget;
if (e.target.closest('a, .sf-toggle') !== toggle) {
return;
}
e.preventDefault();
if ('' !== window.getSelection().toString()) {
@@ -129,9 +135,6 @@
return;
}
/* needed because when the toggle contains HTML contents, user can click */
/* on any of those elements instead of their parent '.sf-toggle' element */
const toggle = e.target.closest('.sf-toggle');
const element = document.querySelector(toggle.getAttribute('data-toggle-selector'));
toggle.classList.toggle('sf-toggle-on');
@@ -154,14 +157,6 @@
toggle.innerHTML = currentContent !== altContent ? altContent : originalContent;
});
/* Prevents from disallowing clicks on links inside toggles */
const toggleLinks = toggle.querySelectorAll('a');
toggleLinks.forEach((toggleLink) => {
toggleLink.addEventListener('click', (e) => {
e.stopPropagation();
});
});
toggle.setAttribute('data-processed', 'true');
});
}