Hi guys,

I had the same problem when mading keyboard shortcuts to a scroll list...

Looks like safari call the events and you can "see" what's going on, but 
it doesn't allow you to stop propagation on keyboard events. So, it will 
ever run the default action for a keyboard event. (like a form submit).


Pigmeu


chris feldmann escreveu:
>> 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
>>
>>     
> Hi Beau.
> Thanks for your reply and also for your work on Signal.js which is one
> slick chunk of code. I made this test script for my server-side guy to
> test on Safari for me because I don't have my powerbook. He reports
> that this (which is supposed to essentially disable the entire
> keyboard) STILL submits on enter keydown on safari.:
> ------------------------------------
> MochiKit.Signal.VERSION
> 1.4
> ------------------------------------
> <html>
> <head>
> <script type="text/javascript"
> src="http://axlotl.dyndns.org/mochikit/packed/MochiKit/MochiKit.js";></script>
> <script type="text/javascript">
> connect( window, "onload", function(){
>     connect( document, "onkeydown", function( e ){
>                     e.stop();
>                     var key = e.key();
>                     for( p in key ){
>                         logDebug( p + " : " + key[p] );
>                     }
>                     logDebug("\n");
>                     if( key.code == 13 || key.code == 3 || key.string
> == 'KEY_ENTER' ){
>
>                         return false;
>
>                     }
>                 } );
> MochiKit.LoggingPane.createLoggingPane( true );
>
> });
> </script>
> </head>
> <body>
>     <form target="entertrap.html" method="post">
>         <input type="text">
>         <br/>
>         <input type="submit">
>     </form>
> </body>
> </html>
>
> >
>   


--~--~---------~--~----~------------~-------~--~----~
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