diff options
author | William Lachance <wrlach@gmail.com> | 2017-07-11 22:27:35 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2017-07-11 22:27:35 +0200 |
commit | 096e19e6c6ed1b79059f098e1f7436404a97e6f9 (patch) | |
tree | 2cc55911c1e52ad0ca572860f5a619f077a67274 /extensions/BugModal/web/common_bug_modal.js | |
parent | bd10e74fa55e2062416fc193db76b73174398624 (diff) | |
download | bugzilla-096e19e6c6ed1b79059f098e1f7436404a97e6f9.tar.gz bugzilla-096e19e6c6ed1b79059f098e1f7436404a97e6f9.tar.xz |
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
Diffstat (limited to 'extensions/BugModal/web/common_bug_modal.js')
-rw-r--r-- | extensions/BugModal/web/common_bug_modal.js | 9 |
1 files changed, 2 insertions, 7 deletions
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') |