jquery - anchor as button with accesskey is behaving different from an actual button -



jquery - anchor as button with accesskey is behaving different from an actual button -

i have anchor accesskey assigned. anchor used button, has anchor since page uses jquery ui theme styling.

in chrome, working fine, can "click" button using <alt> + accesskey.

however, in ie, button "selected" when utilize <alt> + accesskey. how can create sure button "clicked" (without having press "enter" afterwards)?

see fiddle example: http://jsfiddle.net/5yu6anpf/

html:

<a accesskey="a" href="#">anchor (a)</a> <button accesskey="b">button (b)</button> <span id="status">use alt + a/b</span>

javascript:

$("a, button") .button() .click(function() { $("#status").text($(this).text()) });

ie gives focus access-key, can observe focus event triggering click

$("a, button") .button() .focus(function () { $(this).click() }) .click(function () { $("#status").text($(this).text()) });

jquery html jquery-ui mnemonics

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -