From 096e19e6c6ed1b79059f098e1f7436404a97e6f9 Mon Sep 17 00:00:00 2001 From: William Lachance Date: Tue, 11 Jul 2017 16:27:35 -0400 Subject: Bug 1331305 - Auto-resize comment boxes Inspired by earlier work by @KuoE0 in https://github.com/mozilla-bteam/bmo/pull/40 * address review comments * Auto-resize comment when replying --- extensions/BugModal/web/common_bug_modal.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'extensions/BugModal/web/common_bug_modal.js') diff --git a/extensions/BugModal/web/common_bug_modal.js b/extensions/BugModal/web/common_bug_modal.js index 1a2d309bb..b275c3a29 100644 --- a/extensions/BugModal/web/common_bug_modal.js +++ b/extensions/BugModal/web/common_bug_modal.js @@ -871,13 +871,8 @@ $(function() { $.scrollTo($('#comment'), function() { $('#comment').focus(); }); }); - // add comment --> enlarge on focus - if (BUGZILLA.user.settings.zoom_textareas) { - $('#comment') - .focus(function(event) { - $(event.target).attr('rows', 25); - }); - } + // auto-enlarge comment area (up to its max-height) + autosize($('#comment')); // add comment --> private $('#add-comment-private-cb') -- cgit v1.2.3-24-g4f1b