[mochikit] Re: Safari key signals

2006-09-20 Thread koorb

See http://trac.mochikit.com/ticket/182


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



[mochikit] Re: Safari key signals

2006-09-19 Thread koorb

Whoops, don't use the update() part of that ...

Safari will fire the onkeydown and onkeyup twice for arrow keys,
function keys, etc.

KeyNav = function(){ bindMethods(this); };
KeyNav.prototype = {

init: function(){

connect(currentDocument(), 'onkeydown', this.key_down);
},

key_down: function(e){

log(e.key().string);
}
};


key_nav = new KeyNav();
addLoadEvent(key_nav.init);


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



[mochikit] Re: Safari key signals

2006-09-19 Thread koorb


Beau Hartshorne wrote:
> Can you please post a minimal example that demonstrates the problem?

My class, seriously compacted, will log the key press string

---

KeyNav = function(){ bindMethods(this); };
KeyNav.prototype = update(new widgetBase(), {

init: function(){

connect(currentDocument(), 'onkeydown', this.key_down);
},

key_down: function(e){

log(e.key().string);
}
});


key_nav = new KeyNav();
addLoadEvent(key_nav.init);


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



[mochikit] Re: Safari key signals

2006-09-18 Thread Beau Hartshorne

On 18-Sep-06, at 8:39 AM, koorb wrote:

> It seems that Safari is signalling some onkeydown/up events twice. As
> far as I can tell it's arrow keys, function keys and home/end,  
> numlock,
> delete but not keypad numbers. I hope this is a bug that can be
> resolved quickly too.
>
> I have tried to connect to currentWindow(), currentDocument(),  
> document
> and window and they are all behaving the same. I don't think it's my
> code as it only happens with certain keys as I said and only in  
> Safari.

Can you please post a minimal example that demonstrates the problem?

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