add message for emojis not supported on this type
parent
6925320a45
commit
302c2c2813
|
@ -570,6 +570,13 @@
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
showErrorMessageIfEmojiNotSupported(document.querySelector(`#${inputID}`).value, inputID)
|
showErrorMessageIfEmojiNotSupported(document.querySelector(`#${inputID}`).value, inputID)
|
||||||
|
|
||||||
|
const event = new Event('input', {
|
||||||
|
bubbles: true,
|
||||||
|
cancelable: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
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`)) {
|
||||||
const span = document.createElement("span");
|
const span = document.createElement("span");
|
||||||
|
@ -583,13 +590,7 @@
|
||||||
document.querySelector(`label[for="${inputID}-label"] span`).textContent = 'Bitte gib deinen Text ein';
|
document.querySelector(`label[for="${inputID}-label"] span`).textContent = 'Bitte gib deinen Text ein';
|
||||||
document.querySelector(`label[for="${inputID}-label"] span`).style.color = 'red';
|
document.querySelector(`label[for="${inputID}-label"] span`).style.color = 'red';
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
const event = new Event('input', {
|
|
||||||
bubbles: true,
|
|
||||||
cancelable: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
document.querySelector(`#${inputID}`).dispatchEvent(event); */
|
|
||||||
|
|
||||||
showErrorMessageIfEmojiNotSupported(e.target.value, inputID)
|
showErrorMessageIfEmojiNotSupported(e.target.value, inputID)
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue