mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 18:36:36 +00:00
compose: Fix buggy tooltip on validation.
Compose send tooltip was not correctly displayed when the compose box was in an invalid state. We significanlty improve the logic for displaying the tooltip here to provide a more robust experience to the user.
This commit is contained in:
@@ -71,14 +71,6 @@ export function initialize() {
|
||||
compose_ui.handle_keyup(event, $("textarea#compose-textarea").expectOne());
|
||||
});
|
||||
|
||||
$("#compose-send-button").on("mouseenter", () => {
|
||||
compose_validate.validate(false, false);
|
||||
compose_validate.update_send_button_status();
|
||||
});
|
||||
$("#compose-send-button").on("mouseleave", () => {
|
||||
$("#compose-send-button").removeClass("disabled-message-send-controls");
|
||||
});
|
||||
|
||||
$("textarea#compose-textarea").on("input propertychange", () => {
|
||||
if ($("#compose").hasClass("preview_mode")) {
|
||||
compose.render_preview_area();
|
||||
@@ -606,6 +598,7 @@ export function initialize() {
|
||||
const $input = $("input#stream_message_recipient_topic");
|
||||
$input.val("");
|
||||
$input.trigger("focus");
|
||||
compose_validate.validate_and_update_send_button_status();
|
||||
});
|
||||
|
||||
$("input#stream_message_recipient_topic").on("focus", () => {
|
||||
|
||||
Reference in New Issue
Block a user