]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6794 Add a keyboard shortcut to submit an issue comment
authorStas Vilchik <vilchiks@gmail.com>
Wed, 18 Nov 2015 15:49:15 +0000 (16:49 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 18 Nov 2015 15:49:15 +0000 (16:49 +0100)
server/sonar-web/src/main/js/components/issue/views/comment-form-view.js

index c1dc3cfd17286d7ab072dc8a4351b00def72eb80..6c95b4478dd620ddcf3a9b4d084a4cf55df05024 100644 (file)
@@ -41,6 +41,9 @@ export default PopupView.extend({
     if (e.keyCode === 27) {
       this.destroy();
     }
+    if (e.keyCode === 13 && (e.metaKey || e.ctrlKey)) {
+      this.submit();
+    }
   },
 
   cancel: function () {