Drive-by: I don't think you can remove all handlers like this using CodeMirror, and even if you could it doesn't seem like the right thing to do, because there might be other listeners for the same event that shouldn't get blown away.