mirror of https://github.com/zulip/zulip.git
composebox_typeahead: Fix checking whether messages can be sent.
Before calling `on_enter_send`, we checked if the `compose-send-button` is disabled, but never actually set it to disabled, rather we updated its container (.message-send-controls) with that state. This commit fixes that by correctly checking the button's container for the class .disabled-message-send-controls which is set to indicate that the user cannot send messages at the moment. Fixes #30620
This commit is contained in:
parent
9fb6b4d016
commit
4bd9a8ce50
|
@ -360,7 +360,7 @@ function handle_keydown(
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (
|
if (
|
||||||
compose_validate.validate_message_length() &&
|
compose_validate.validate_message_length() &&
|
||||||
!$("#compose-send-button").prop("disabled")
|
!$(".message-send-controls").hasClass("disabled-message-send-controls")
|
||||||
) {
|
) {
|
||||||
on_enter_send();
|
on_enter_send();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue