maheshchari / js-hotkeys

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

Callbacks executed multiple times #81

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Define two or more keys.
(The next steps are purely for visual aid.)
2. Add an alert to one of them.
3. Open and press the key you have given the alert to.

Example Code:
jQuery(document).bind('keydown', 'a',function (evt){return false; });
jQuery(document).bind('keydown', 'b',function (evt){alert('foo'); return
false; });
jQuery(document).bind('keydown', 'c',function (evt){return false; });

What is the expected output? What do you see instead?
You should only see the alert once if the key was pressed only once. I see
the alert as many times as there are defined keys, in this case, three
times when 'b' is pressed.

What version of the product are you using? On what operating system?
hotkeys 0.7.9
Windows 7
with IE 8.0.x and Firefox 3.6.x

Please provide any additional information below.

Seems to be existent in all previous versions, though I haven't bothered to
test it on any versions previous of 0.7.6.

I consider this a major issue, both for performance and logical problems
this issue may cause.

Original issue reported on code.google.com by zava...@gmail.com on 7 Apr 2010 at 8:25

GoogleCodeExporter commented 8 years ago
If you're using jQuery 1.4.2, you should probably use js-hotkeys version 0.8 
from 
http://github.com/jeresig/jquery.hotkeys

Original comment by tdai...@gmail.com on 28 Apr 2010 at 5:39

GoogleCodeExporter commented 8 years ago
This bug is a duplicate of #78

Original comment by tako.bru...@gmail.com on 10 Aug 2010 at 7:07