javascript - keyboard scrolling on focused div in webkit -
i've got little jquery plugin. there images in vertically scrollable div. can click on div , scroll using arrow keys.
if take @ example, can see want observe if arrow key right/left pressed , if so, jump next image. in firefox , ie, keyup() event being called, , in safari , chrome it's not.
i have encountered several strange scrolling , focus behaviours in webkit browsers, don't know why keyup() event not being fired. if have idea, please let me know.
just add tabindex
attribute div
-element , work. kind of hack make otherwise not focusable element focusable, input
or button
.
depending on value given tabindex
, behave diffrently:
0
allow focus element keyboard arrows , tab key-1
disable tabbing, still focusable- anything greater
0
allow prioratize tab focusing,1
has highest priority
i've updated jsfiddle demo accordingly.
Comments
Post a Comment