Langage: HTML
<button class="btn btn-transverse light btn-lg" id="button_413304386" type="button">
<span class="btn-content-prepend">
<img width="24" height="24" class="mr-2" src="https://cdn.francetravail.fr/studio/logos/marque/Symbole_France_Travail_RVB_Coul_Positif.svg" alt="">
</span>
<span class="btn-content">Se connecter avec France Travail<span class="dot-pink" aria-hidden="true"></span>Pro</span>
</button> // L'aperçu n'est pas disponible pour les dépendances externes
window.addEventListener('load', function () {
/**
* Désactivation du clic sur les input disabled
*/
// On liste les input disabled
const disabledInputs = document.querySelectorAll('[aria-disabled="true"]');
for (const input of disabledInputs) {
// Pour chaque input on empêche le click
input.addEventListener('click', function (e) {
e.preventDefault();
e.stopPropagation();
});
// Pour chaque label associé, on empêche le click
const label = document.querySelector('[for="' + input.id + '"]');
if (label) {
document.querySelector('[for="' + input.id + '"]').addEventListener('click', function (e) {
e.preventDefault();
e.stopPropagation();
});
}
}
});