AnitaTang / js-hotkeys

Automatically exported from code.google.com/p/js-hotkeys
0 stars 0 forks source link

Handler function fired several times #85

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Take your test page and insert an alert in any of the handler functions.
Something like this:
                jQuery(document).bind(
            'keydown', 
            'esc',
            function (evt){
               jQuery('#_esc').addClass('dirty');
               alert("Esc pressed!!!");
               return false; 
            }
        );

2. Leave the rest of the code as is.
3. You will see that the alert window is invoked as many times as many bind
statements you have.

What is the expected output? What do you see instead?
The hotkey handler function should be fired only once, but instead it is
fired as many times as there are bind statements.

What version of the product are you using? On what operating system?
Version 0.7.9 on Windows XP Professional

Please provide any additional information below.
I am attaching the file so you could simply open it up with any browser and
see the problem immediately.

Original issue reported on code.google.com by detar...@gmail.com on 27 May 2010 at 8:44

Attachments: