auto change font size to small if text is too long

main
alexanderroese 2024-08-13 10:44:06 +02:00
parent a72dd8fd26
commit 6d750402cf
1 changed files with 9 additions and 0 deletions

View File

@ -1007,6 +1007,15 @@
this.disableBuyButton();
console.log("text too long, selectect font size", document.querySelector('#shx-fontSize').value);
// if font size is not small, set it to small
if(document.querySelector('#shx-fontSize').value !== 'Klein #small') {
alert("Text ist zu lang. Wir haben die Schriftgröße auf klein gesetzt. Bitte überprüfe deinen Text.");
document.querySelector('#shx-fontSize').value = 'Klein #small';
document.querySelector('#shx-fontSize').dispatchEvent(new Event('change'));
}
}
hideLoadingSpinner() {