compose_ui: Automatically resize textarea after adding new syntax.

This fixes existing problems as well as an upcoming problem that
copy-and-pasting in markdown should usually expand the compose text
area.
This commit is contained in:
Tim Abbott 2017-11-21 19:43:45 -08:00
parent d400b10282
commit 9fa58a3c16
2 changed files with 7 additions and 0 deletions

View File

@ -38,6 +38,10 @@ function make_textbox(s) {
return widget.s;
};
widget.trigger = function () {
return;
};
return widget;
}

View File

@ -29,6 +29,9 @@ exports.smart_insert = function (textarea, syntax) {
textarea.caret(syntax);
textarea.focus();
// This should just call exports.autosize_textarea, but it's a bit
// annoying for the unit tests, so we don't do that.
textarea.trigger("autosize.resize");
};
exports.insert_syntax_and_focus = function (syntax) {