]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5935 Close tag input field on escape key
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Tue, 6 Jan 2015 14:43:12 +0000 (15:43 +0100)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Wed, 7 Jan 2015 10:37:12 +0000 (11:37 +0100)
server/sonar-web/src/main/coffee/issue/issue-view.coffee

index 9f66dbb52f6dff7fc8f5ef09b79bfc24791ce48e..eff00d06d1e160230b2276e3795d2b69414107eb 100644 (file)
@@ -291,6 +291,11 @@ define [
         key.setScope 'tags'
         key 'escape', 'tags', => @cancelEdit()
 
+        @$('.select2-input').keyup((event) =>
+          if (event.which == 27)
+            @cancelEdit()
+        )
+
         @ui.tagInput.select2 'focus'
       .fail =>
         window.process.failBackgroundProcess p