Word break
This commit is contained in:
parent
1999a6c8d8
commit
ae5fffe5e0
@ -36,7 +36,10 @@ class ChatInputElement extends HTMLElement {
|
||||
if (e.key == 'Enter') {
|
||||
if(!e.shiftKey){
|
||||
e.preventDefault()
|
||||
this.dispatchEvent(new CustomEvent("submit", { detail: e.target.value, bubbles: true }))
|
||||
const message = e.target.value.trim();
|
||||
if(!message)
|
||||
return
|
||||
this.dispatchEvent(new CustomEvent("submit", { detail: message, bubbles: true }))
|
||||
e.target.value = ''
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user