mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 16:01:58 +00:00
tippy: Fix compose close button logic.
There are two different tooltips for compose close button in compose box. One is when there is no text in the inputbox that says 'Cancel compose' and if there is text in the inputbox then it says 'Cancel compose and save draft' however the logic of these two tooltips was reversed. This commit fixes that.
This commit is contained in:
committed by
Tim Abbott
parent
ebc07c0dd7
commit
9809d229de
@@ -460,12 +460,12 @@ export function initialize() {
|
||||
// Change compose close button tooltip as per condition.
|
||||
// We save compose text in draft only if its length is > 2.
|
||||
if (compose_text_length > 2) {
|
||||
$("#compose_close").attr("data-tooltip-template-id", "compose_close_tooltip_template");
|
||||
} else {
|
||||
$("#compose_close").attr(
|
||||
"data-tooltip-template-id",
|
||||
"compose_close_and_save_tooltip_template",
|
||||
);
|
||||
} else {
|
||||
$("#compose_close").attr("data-tooltip-template-id", "compose_close_tooltip_template");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user