Show
Ignore:
Timestamp:
05/21/07 12:39:59 (18 months ago)
Author:
mbonetti
Message:

submit tags with return and enter

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/ajax.php

    r1662 r1717  
    259259        // set the caret to the end of the field for bloody IE 
    260260        var control = tc.firstChild; 
     261          control.onkeyup = function(e) { 
     262                if (!e) { e = event; e.which = e.keyCode; } 
     263                switch (e.which) { 
     264                 case 10: // return 
     265                 case 13: // enter 
     266                 setTags(id,control.value);  
     267                 return false; 
     268                 break; 
     269                 default: return true;   
     270                } 
     271          }; 
    261272        control.focus(); 
    262273        if (control.createTextRange) {