compose: Move keydown and keyup from compose.js to compose_ui.js.

This commit moves the handle_keydown and handle_keydown functions
of compose.js to compose_ui.js.

Part of splitting compose.js.
This commit is contained in:
Priyam Seth
2021-07-28 21:53:34 +05:30
committed by Tim Abbott
parent de04f0ad67
commit 3ec55e7976
6 changed files with 265 additions and 260 deletions

View File

@@ -10,6 +10,7 @@ import * as blueslip from "./blueslip";
import * as channel from "./channel";
import * as compose from "./compose";
import * as compose_actions from "./compose_actions";
import * as compose_ui from "./compose_ui";
import * as composebox_typeahead from "./composebox_typeahead";
import * as condense from "./condense";
import * as confirm_dialog from "./confirm_dialog";
@@ -473,12 +474,12 @@ function edit_message(row, raw_content) {
currently_editing_messages.get(rows.id(row)).listeners = listeners;
}
composebox_typeahead.initialize_compose_typeahead(edit_id);
compose.handle_keyup(null, $(edit_id).expectOne());
compose_ui.handle_keyup(null, $(edit_id).expectOne());
$(edit_id).on("keydown", function (event) {
compose.handle_keydown(event, $(this).expectOne());
compose_ui.handle_keydown(event, $(this).expectOne());
});
$(edit_id).on("keyup", function (event) {
compose.handle_keyup(event, $(this).expectOne());
compose_ui.handle_keyup(event, $(this).expectOne());
});
break;
}