Welcome to WebmasterWorld Guest from 54.198.41.76

Forum Moderators: open

Message Too Old, No Replies

Safari double event with arrows?

Safari arrow key keydown double event

     
8:40 pm on May 2, 2006 (gmt 0)

New User

10+ Year Member

joined:Aug 20, 2004
posts:21
votes: 0


Safari appears to fire the arrow keys event twice

<script type="text/javascript">
function teaseme(evt){
evt = (window.event)? window.event : evt;i_ekey = (evt.keyCode)? evt.keyCode : evt.which;
evtTarget = (evt.target)? evt.target : evt.srcElement;
alert(evtTarget.nodeName+"\n"+evt.type+"\n"+i_ekey)
}
</script>
<input type="text" onkeypress="teaseme(event)" value=""/>

expected for up arrows PC FF1.5/opera8/IE7beta2:
alert "INPUT keydown 38"
alert "INPUT keypress 38"

safari 1.3.2/2.0.1:
alert "INPUT keydown 38"
alert "INPUT keypress 63232"
alert "INPUT keydown 38"
alert "INPUT keypress 63232"

also note: home / pg up /pg dn all yield similar results.

it doesn't appear to be OSX related...OSX FF1.5, n7.2, n6.2, ie5.2 seem to return the correct keycode...

I checked around apple / google groups/ webmaster world
haven't seen much info on it.

I don't mind coding for it, I just want to make sure that I am not overlooking something

thanks for any info or clarification.

1:18 pm on May 3, 2006 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member whoisgregg is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 9, 2003
posts:3416
votes: 0


Welcome to WebmasterWorld [webmasterworld.com], visionmonster!

This was discussed a while back [webmasterworld.com] here at WebmasterWorld. There is a bug filed [bugzilla.opendarwin.org].