From ec8bd077d1530f900664de908492e3d5d00e0b1c Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Fri, 14 Apr 2017 06:09:13 -0700 Subject: [PATCH] compose: Extract clear_textarea(). --- static/js/compose.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/compose.js b/static/js/compose.js index c41eaa05e5..2349268a16 100644 --- a/static/js/compose.js +++ b/static/js/compose.js @@ -111,11 +111,15 @@ function clear_invites() { $("#compose_invite_users").empty(); } +exports.clear_textarea = function () { + $("#compose").find('input[type=text], textarea').val(''); +}; + function clear_box() { clear_invites(); clear_all_everyone_warnings(); user_acknowledged_all_everyone = undefined; - $("#compose").find('input[type=text], textarea').val(''); + exports.clear_textarea(); $("#new_message_content").removeData("draft-id"); exports.autosize_textarea(); $("#send-status").hide(0);