In Firefox and Chrome my code works fine but in IE the event does not get removed.
dojo.connect(d, "onmouseout", function(evt) {
//remove event
});
I've tried:
document.removeEventListener("keydown", keyHandler);
dojo.disonnect(document, "keydown", keyHandler);
document.detachEvent("keydown", keyHandler);
But nothing seems to work. keyHandler
is the function which I don't want to execute on keydown
when the mouse is out of the canvas stored in variable d
.
Managed to get it working with this command: document.onkeydown = null;