Firefox 1.5 Keypress Event Changes
Someone submitted a post to the P2P forum saying that one of my book examples is no longer working in Firefox 1.5. After some investigating, I made an interesting discovery. It seems that in Firefox 1.5, the keypress event behaves differently than in previous version.
As I said in Professional JavaScript, the keypress event fires only for character keys (those keys that produce output). Prior to Firefox (and in other browsers) these did not include keys like Backspace and Delete. Firefox 1.5 now fires the event for Backspace, Delete, Ins, and Pause/Break. I haven’t been able to find a bug relating to this change, but it sure is annoying.
Disclaimer: Any viewpoints and opinions expressed in this article are those of Nicholas C. Zakas and do not, in any way, reflect those of my employer, my colleagues, Wrox Publishing, O'Reilly Publishing, or anyone else. I speak only for myself, not for them.
Both comments and pings are currently closed.




2 Comments
Hmmm….that is weird. Why would they do that? After all they’ve done to get in the good graces of the web developer community (after years of Netscape crapola) and the general web browsing world, they seem to do these odd things every once in a while. All I can figure is that I’m too opaque to see the beauty in this "solution".
Mike Shaffer on January 19th, 2006 at 8:04 am
Well, I can *almost* understand Backspace and Delete, because they cause a change to the text…but as for Ins and Pause/Break…not a clue.
Nicholas C. Zakas on January 19th, 2006 at 9:18 am
Comments are automatically closed after 14 days.