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