mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33:41 -05:00
web/composer: prevent sending when loading media
We already are setting the button to disabled, but you can also invoke
onClickSend by pressing "Enter". See
b01b3f0e32/web/src/ui/composer/MessageComposer.tsx (L615)
Signed-off-by: Sumner Evans <me@sumnerevans.com>
This commit is contained in:
parent
f94d84b044
commit
9b41f37bd1
1 changed files with 1 additions and 1 deletions
|
@ -166,7 +166,7 @@ const MessageComposer = () => {
|
||||||
const canSend = Boolean(state.text || state.media || state.location)
|
const canSend = Boolean(state.text || state.media || state.location)
|
||||||
const onClickSend = (evt: React.FormEvent) => {
|
const onClickSend = (evt: React.FormEvent) => {
|
||||||
evt.preventDefault()
|
evt.preventDefault()
|
||||||
if (!canSend) {
|
if (!canSend || loadingMedia) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
doSendMessage(state)
|
doSendMessage(state)
|
||||||
|
|
Loading…
Add table
Reference in a new issue