compose: Refactor autosize_textarea to work while editing messages.

Previously, compose_ui.autosize_textarea didn't work while editing
messages in many cases (uploading files, typeaheads, keydown handling,
etc.).

Refactored the autosize_textarea function in compose_ui to work
while editing messages too and added appropriate argument for the
introduced function parameter at all occurences of the function
use.

Also, updated the corresponding test cases.
This commit is contained in:
Priyansh Garg
2020-09-05 03:19:49 +05:30
committed by Tim Abbott
parent abe876a4a4
commit 6684247147
7 changed files with 38 additions and 13 deletions

View File

@@ -92,7 +92,7 @@ function clear_box() {
exports.clear_textarea();
$("#compose-textarea").removeData("draft-id");
compose_ui.autosize_textarea();
compose_ui.autosize_textarea($("#compose-textarea"));
$("#compose-send-status").hide(0);
}