mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
compose: Refactor functions for handling max length limits.
Refactors `check_overflow_text` and `validate_message_length` functions. This commit ensures that there won't be any change in the existing UI of the compose box with the refactoring of the above functions.
This commit is contained in:
@@ -70,7 +70,7 @@ export function initialize() {
|
||||
|
||||
$("textarea#compose-textarea").on("input propertychange", () => {
|
||||
compose_validate.warn_if_topic_resolved(false);
|
||||
const compose_text_length = compose_validate.check_overflow_text();
|
||||
const compose_text_length = compose_validate.check_overflow_text($("#send_message_form"));
|
||||
if (compose_text_length !== 0 && $("textarea#compose-textarea").hasClass("invalid")) {
|
||||
$("textarea#compose-textarea").toggleClass("invalid", false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user