diff --git a/client/src/components/content-blocks/assignment/SubmissionInput.vue b/client/src/components/content-blocks/assignment/SubmissionInput.vue index 658f09e1..4c267dfa 100644 --- a/client/src/components/content-blocks/assignment/SubmissionInput.vue +++ b/client/src/components/content-blocks/assignment/SubmissionInput.vue @@ -48,7 +48,11 @@ const editText = ref(props.inputText); const emit = defineEmits(['input']); const containsEmoji = (text: string) => { + if (!text) { + return false + } const lastCharacter = Array.from(text)[Array.from(text).length - 1]; + if (lastCharacter && lastCharacter.charCodeAt(0)> 55000) //fix for the hand symbol 🖐️ return true const emojiRegex = /\p{Emoji}/u; @@ -59,11 +63,9 @@ watch( () => props.inputText, (newValue) => { // TODO: Lorenz this is an ugly fix! - console.log(newValue) - if (containsEmoji(newValue)) { - console.log("emoji found", newValue) editText.value = newValue; + emit('input', editText.value); } } );