AnitaTang / js-hotkeys

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

Plugin doesn't work for multiple targets #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open hotkeys.html from attached archive in IE/FF (tested on IE7/FF2)
2. Click the first button, then press Ctrl + C. Alert 'II' appears
3. Click the second button, then press Ctrl + C. Nothing happens

What is the expected output? What do you see instead?
1. Alert 'I' should appear for the first button
2. Alert 'II' should appear for the second button

Looks like it's not a good idea to use hash as a storage for HTML elements.
I've written little unique ID generator and the problem has gone (standard
jQuery.data IMHO doesn't suit well for ID generation because of:

1. It pollutes elements with expando even for the case when you just need
to check whether unique id exists

2. It is being removed on unload event, so that custom components that I'm
writing cannot use destroy() method as a single-point for AJAX and page unload
)

Original issue reported on code.google.com by mika...@gmail.com on 12 Jun 2008 at 11:52

Attachments:

GoogleCodeExporter commented 8 years ago
I just finished working on the problem described above.
It will be in soon after I will check it on all the platforms (linux, win, 
mac), with
all the browsers (FF, IE, Safari, Opera)

Original comment by Afro.Sys...@gmail.com on 21 Aug 2008 at 8:49