mirror of https://github.com/zulip/zulip.git
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:
parent
d400b10282
commit
9fa58a3c16
|
@ -38,6 +38,10 @@ function make_textbox(s) {
|
|||
return widget.s;
|
||||
};
|
||||
|
||||
widget.trigger = function () {
|
||||
return;
|
||||
};
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue