mirror of https://github.com/zulip/zulip.git
Add compose_actions.cancel() shim.
This commit is contained in:
parent
faa9446e64
commit
59fd9e4d48
|
@ -354,7 +354,7 @@ $(function () {
|
|||
$(".compose-content").click(handle_compose_click);
|
||||
|
||||
$("#compose_close").click(function () {
|
||||
compose.cancel();
|
||||
compose_actions.cancel();
|
||||
});
|
||||
|
||||
$("#join_unsub_stream").click(function (e) {
|
||||
|
@ -564,7 +564,7 @@ $(function () {
|
|||
($(e.target).closest(".modal").length === 0) &&
|
||||
window.getSelection().toString() === "" &&
|
||||
($(e.target).closest('#emoji_map').length === 0)) {
|
||||
compose.cancel();
|
||||
compose_actions.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ exports.process_escape_key = function (e) {
|
|||
|
||||
if (compose.composing()) {
|
||||
// If the user hit the escape key, cancel the current compose
|
||||
compose.cancel();
|
||||
compose_actions.cancel();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -236,7 +236,7 @@ exports.process_escape_key = function (e) {
|
|||
}
|
||||
|
||||
if (compose.composing()) {
|
||||
compose.cancel();
|
||||
compose_actions.cancel();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -447,13 +447,13 @@ exports.process_hotkey = function (e, hotkey) {
|
|||
// we handle this in other functions.
|
||||
|
||||
if (event_name === 'left_arrow' && focus_in_empty_compose()) {
|
||||
compose.cancel();
|
||||
compose_actions.cancel();
|
||||
message_edit.edit_last_sent_message();
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((event_name === 'up_arrow' || event_name === 'down_arrow') && focus_in_empty_compose()) {
|
||||
compose.cancel();
|
||||
compose_actions.cancel();
|
||||
// don't return, as we still want it to be picked up by the code below
|
||||
} else if (event_name === "page_up") {
|
||||
$("#new_message_content").caret(0);
|
||||
|
|
|
@ -194,7 +194,7 @@ exports.activate = function (raw_operators, opts) {
|
|||
var had_message_content = compose.has_message_content();
|
||||
|
||||
if (!had_message_content) {
|
||||
compose.cancel();
|
||||
compose_actions.cancel();
|
||||
} else {
|
||||
compose_fade.update_message_list();
|
||||
}
|
||||
|
@ -454,7 +454,7 @@ exports.deactivate = function () {
|
|||
}
|
||||
|
||||
if (!compose.has_message_content()) {
|
||||
compose.cancel();
|
||||
compose_actions.cancel();
|
||||
}
|
||||
|
||||
current_filter = undefined;
|
||||
|
|
|
@ -11,3 +11,4 @@ narrow_state.set_compose_defaults = narrow.set_compose_defaults;
|
|||
|
||||
var compose_actions = {};
|
||||
compose_actions.start = compose.start;
|
||||
compose_actions.cancel = compose.cancel;
|
||||
|
|
Loading…
Reference in New Issue