Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
compose_banner: Flash only once for exceeded length.
Apoorva Pendseb547dcd64311
diff --git a/web/src/compose_validate.ts b/web/src/compose_validate.tsindex 894267999e7..b83847f4769 100644--- a/web/src/compose_validate.ts+++ b/web/src/compose_validate.ts@@ -890,7 +890,8 @@ export function validate_message_length($container: JQuery, trigger_flash = trueif (message_too_long_for_compose) {if (trigger_flash) {$textarea.addClass("flash");- setTimeout(() => $textarea.removeClass("flash"), 1500);+ // This must be synchronized with the `flash` CSS.+ setTimeout(() => $textarea.removeClass("flash"), 500);}return false;}diff --git a/web/styles/compose.css b/web/styles/compose.cssindex e7b2e582919..42810971fa5 100644--- a/web/styles/compose.css+++ b/web/styles/compose.css@@ -358,7 +358,8 @@.edit-content-container:has(.message_edit_content.textarea-approaching-limit.flash) {- animation: message-limit-flash 0.5s ease-in-out 3;+ /* This should align with the timing in compose_validate.validate_message_length. */+ animation: message-limit-flash 0.5s ease-in-out 1;}#message-content-container .composebox-buttons {