keypress event not being triggered only at start and end of text field in Firefox (JQuery)
- by rlivsey
I'm listening for keypress events on an input field with delegation. For some reason, Firefox doesn't trigger the delegated event for cursor UP when at the start of the field, or cursor DOWN when at the end. LEFT and RIGHT work as expected all the time.
Directly binding an event listener to the field works fine, so it has to be something to do with delegation. Does anyone know if this is a know issue, I couldn't find anything on Google/forums etc..?
$("div").delegate(":input", "keypress", function(e){
// doesn't get triggered
});
$("div :input").bind("keypress", function(e){
// gets triggered fine
});
Here's a demo which shows the issue - http://livsey.org/jquery.delegation.html