Escape key closes volume box
authorDan
Sun, 23 Nov 2008 23:55:37 -0500
changeset 61 88b105a901be
parent 60 acc7755e15b6
child 62 1b73be5346df
Escape key closes volume box
scripts/volume.js
--- a/scripts/volume.js	Sun Nov 23 23:53:29 2008 -0500
+++ b/scripts/volume.js	Sun Nov 23 23:55:37 2008 -0500
@@ -102,9 +102,9 @@
   field.focus();
   field.onkeyup = function(e)
   {
-    if ( e.keyCode == 13 )
+    if ( e.keyCode == 13 || e.keyCode == 27 )
     {
-      if ( this.value == '' )
+      if ( this.value == '' || e.keyCode == 27 )
       {
         $(this.parentNode).fadeOut(250, function(o)
           {