On 25-Jul-06, at 10:35 AM, chris feldmann wrote:

> 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;
>
>                     }
>                 } );

Hi Chris,

Try looking for key.string == 'KEY_ENTER'. If that doesn't work,  
please post a full example for me to play with.

Thanks,
Beau

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
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