agungprasetyosakti / js-hotkeys

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

unbind doesn not work at all with external objects #62

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have a page with svg images embedded using the <embed> tag. The svg links
in a JavaScript file. In that JS file I add hotlesy to a few objects,
including the parent document like so.

parent.$(parent.document).bind('keydown', 'Space', function (e) {
    // do stuff
});

I use parent.$ since jQuery was loaded by the main page.

This works fine. When the svg is unloaded I explicitly call

parent.$(parent.document).unbind('keydown', 'Space', function (e) {
    // do stuff???
});

However, the key (space) is still connected and tries to run "do stuff",
and throws all sorts of errors as it can no longer reference many objects.

Thanks,
a.

Original issue reported on code.google.com by bertol...@gmail.com on 5 Aug 2009 at 9:46

GoogleCodeExporter commented 8 years ago
use lower case notation for the key command

Original comment by chpalati...@gmail.com on 4 Dec 2009 at 8:51