mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
We were updating the compose banners on every `keyup` event on the topic input. Since, `keyup` also gets triggered for the modifier and non-printing keys such as "Enter", this lead to banner for topic required being closed via the `check_posting_policy_for_compose_box` when pressing "Enter" to send a message with no topic. This bug was probably introduced in5c993f0, which moved additional logic into `update_on_recipient_change`. To solve this issue, we use the `input` event instead of the `keyup` event to update the compose banners only when the value inside the input element changes. This change also prevents the the compose banner from being closed when we only press modifier keys - such as Shift. (cherry picked from commit44f313633f)