I know this doesn't directly address the problem, but couldn't you
return false in the onSubmit handler for the form to make it so hitting
ENTER doesn't send the form off?  You could then have an additional
control or widget that sends the form in an appropriate way.

 - Kevin


chris feldmann wrote:
> Hi mochinauts.
> I am trying to disable form submission on enter keydown. This snippet
> works on every platform except safai, which even does the visual
> "submit press" animation cue and then submits. Is there some secret
> sauce for safari's enter key?
>
> connect( window, "onload", function(){
>     connect( document, "onkeydown", function( e ){
>                     e.stop();
>                     var key = e.key();
>                     for( p in key ){
>                         logDebug( p + " : " + key[p] );
>                     }
>                     if( key.code == 13 || key.code == 3 ){
>
>                         return false;
> 
>                     }
>                 } );


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to