]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5136 Add "escape" key to close extended description, enable tab support
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Wed, 11 Jun 2014 13:11:08 +0000 (15:11 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Wed, 11 Jun 2014 13:11:08 +0000 (15:11 +0200)
sonar-server/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee

index d516674bdc872494b29a6a211fa796fc4a40bb98..010bf60bd5fb2c3cf1e196563dcd8ad37509b7d3 100644 (file)
@@ -165,9 +165,13 @@ define [
     showExtendDescriptionForm: ->
       @ui.descriptionExtra.hide()
       @ui.extendDescriptionForm.show()
+      key.setScope 'extraDesc'
+      key 'escape', 'extraDesc', => @hideExtendDescriptionForm()
+      @ui.extendDescriptionText.focus()
 
 
     hideExtendDescriptionForm: ->
+      key.unbind 'escape', 'extraDesc'
       @ui.descriptionExtra.show()
       @ui.extendDescriptionForm.hide()