javascript - jQuery global focus hook -
in focus manager need store info on last focus , blur. need delegate hook body, if use * filter receive focus event every parent item of actual thing getting focus.
realistically, make filter accept a, input, button ... etc, need refine a:not([tabindex]=-1), *[tabindex!=-1] etc.
but gets complicated when 1 considers disabled controls. there jquery selector :focusable, or how work around this? debounce function, iffy.
edit: alright, bad, think looking here :tabbable.
you can check focus using: $("yourselector").is( ":focus" )
if want stop bubbling dom return false in function after doing stuff.enter code here
Comments
Post a Comment