add message for emojis not supported on this type

main
alexanderroese 2024-07-25 22:18:22 +02:00
parent 302c2c2813
commit ec27a08ebc
1 changed files with 2 additions and 3 deletions

View File

@ -569,13 +569,13 @@
setTimeout(() => { setTimeout(() => {
showErrorMessageIfEmojiNotSupported(document.querySelector(`#${inputID}`).value, inputID) showErrorMessageIfEmojiNotSupported(document.querySelector(`#${inputID}`).value, inputID)
/*
const event = new Event('input', { const event = new Event('input', {
bubbles: true, bubbles: true,
cancelable: true, cancelable: true,
}); });
document.querySelector(`#${inputID}`).dispatchEvent(event); document.querySelector(`#${inputID}`).dispatchEvent(event); */
document.querySelector(`#${inputID}`).addEventListener('input', (e)=>{ document.querySelector(`#${inputID}`).addEventListener('input', (e)=>{
if (!document.querySelector(`label[for="${inputID}-label"] span`)) { if (!document.querySelector(`label[for="${inputID}-label"] span`)) {
@ -591,7 +591,6 @@
document.querySelector(`label[for="${inputID}-label"] span`).style.color = 'red'; document.querySelector(`label[for="${inputID}-label"] span`).style.color = 'red';
} }
showErrorMessageIfEmojiNotSupported(e.target.value, inputID) showErrorMessageIfEmojiNotSupported(e.target.value, inputID)
}); });
}, 1000); }, 1000);