diff --git a/static/js/compose_actions.js b/static/js/compose_actions.js index d22981572c..5e4a160863 100644 --- a/static/js/compose_actions.js +++ b/static/js/compose_actions.js @@ -467,7 +467,7 @@ export function quote_and_reply(opts) { const fence = fenced_code.get_unused_fence(message.raw_content); content += `${fence}quote\n${message.raw_content}\n${fence}`; compose_ui.replace_syntax("[Quoting…]", content, textarea); - autosize.update($("#compose-textarea")); + compose_ui.autosize_textarea($("#compose-textarea")); } if (message && message.raw_content) { diff --git a/static/js/compose_ui.js b/static/js/compose_ui.js index 23e1975219..39a8e2c877 100644 --- a/static/js/compose_ui.js +++ b/static/js/compose_ui.js @@ -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")) { diff --git a/static/js/composebox_typeahead.js b/static/js/composebox_typeahead.js index 9ab33f91fb..3709fd8d0b 100644 --- a/static/js/composebox_typeahead.js +++ b/static/js/composebox_typeahead.js @@ -1,4 +1,3 @@ -import autosize from "autosize"; import {formatISO} from "date-fns"; import ConfirmDatePlugin from "flatpickr/dist/plugins/confirmDate/confirmDate"; import $ from "jquery"; @@ -176,7 +175,7 @@ export function handle_enter(textarea, e) { // Now add the newline, remembering to resize the // textarea if needed. textarea.caret("\n"); - autosize.update(textarea); + compose_ui.autosize_textarea(textarea); e.preventDefault(); return; }