I tried preventDefault()
but I haven't had success. Is there something that I'm missing?
I would try to disable it globally, if possible (like registering the events on window
)
I tried preventDefault()
but I haven't had success. Is there something that I'm missing?
I would try to disable it globally, if possible (like registering the events on window
)
If I correctly understand your problem, you could try this.
There doesn't seem to be a way to stop the event from triggering. The only alternative seems to be to remove the accesskey attributes temporarily while you don't want them to work. That's what jQuery UI has to do for modal dialogs.
Here's the code from that thread:
As you can see it's saving the accesskey attributes to jQuery data before removing them:
and then restoring them from the data:
I'd be interested in a solution that actually prevents the event rather than using this workaround.
Using the previous answer, you can use this trick to "remove" all "accesskey" options from the page.
Simply set all accesskey on the page for nothing.