mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 08:56:10 +00:00
tippy: Fix compose close button tooltip when no input.
The tooltip of the compose_close_button changes only when something is typed into the input box. However, the state of the tooltip remains the same until someone types into the input box again, even if they close and reopen the compose box. The function 'expand_compose_box' from 'compose_actions.js' is called every time the compose box is opened. Since the input field is emptied every time the compose box is closed, this function is used to set the default tooltip for the close button. We want it to say 'Cancel Compose' every time the compose box is opened since the input field is always going to be empty whenever the compose box reopens.
This commit is contained in:
@@ -133,6 +133,7 @@ export function autosize_message_content() {
|
||||
}
|
||||
|
||||
export function expand_compose_box() {
|
||||
$("#compose_close").attr("data-tooltip-template-id", "compose_close_tooltip_template");
|
||||
$("#compose_close").show();
|
||||
$("#compose_controls").hide();
|
||||
$(".message_comp").show();
|
||||
|
||||
Reference in New Issue
Block a user