mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
refractor: Replace manual autosize of textarea with compose_ui autosize.
This commit make compose_ui.autosize_textarea handle most of the autosize logic of the textarea. It audits for any logic that is trying to do autosize manually and replace it with compose_ui.autosize_textarea. This allows to have better check for when the textarea is autosized. Mainly done this so that we can have a check on #compose-textarea when to autosize and when not to, thus helping to have all the logic in only one function.
This commit is contained in:
@@ -51,9 +51,7 @@ export function smart_insert(textarea, syntax) {
|
||||
textarea.caret(syntax);
|
||||
}
|
||||
|
||||
// This should just call exports.autosize_textarea, but it's a bit
|
||||
// annoying for the unit tests, so we don't do that.
|
||||
autosize.update(textarea);
|
||||
autosize_textarea(textarea);
|
||||
}
|
||||
|
||||
export function insert_syntax_and_focus(syntax, textarea = $("#compose-textarea")) {
|
||||
|
||||
Reference in New Issue
Block a user