Problems with keydown-Event when pushing ESC
Hello,
I want to send an Ajax-Request, when the Esc-key is pushed. (keycode == 27)
The code is shown below:
- $j(this).keydown(function(event)
{
switch(event.keyCode)
{
case 27:
if(wp_active() && ready_to_submit)
{
$j(".wp_cancel").click();
}
break;
- ...
The strange point is: The request gets fired and canceled immediately. When i try the same thing with any other key, it works fine. (request is not being canceled) Any idea whats the problem?
Best Regards