]> source.dussan.org Git - sonarqube.git/commitdiff
New Issues Page: autofocus comment textarea
authorStas Vilchik <vilchiks@gmail.com>
Thu, 6 Feb 2014 09:36:35 +0000 (15:36 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 6 Feb 2014 09:55:00 +0000 (15:55 +0600)
sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_issue_detail_comment_form.hbs.erb
sonar-server/src/main/webapp/javascripts/navigator/issues.js

index 78ce1af9e76c19adb9a214c82616d11fc5ed046a..f408ed8a10f9c4d37807c6a61a7f113b65d08177 100644 (file)
@@ -2,8 +2,7 @@
   <table class="width100">
     <tr>
       <td style="vertical-align:top" colspan="2">
-        <textarea id="issue-comment-text" rows="4" name="text"
-                  style="width: 100%" autofocus>{{raw}}</textarea>
+        <textarea id="issue-comment-text" rows="4" name="text"style="width: 100%">{{raw}}</textarea>
       </td>
     </tr>
     <tr>
index 778dd8f7d5dcacb6e5c31594e499c1e748e33752..e2680c5447273306a7b160c20b88ebf1406f45db 100644 (file)
@@ -494,6 +494,11 @@ jQuery(function() {
     },
 
 
+    onDomRefresh: function() {
+      this.ui.textarea.focus();
+    },
+
+
     toggleSubmit: function() {
       this.ui.submitButton.prop('disabled', this.ui.textarea.val().length === 0);
     },