html - Cannot give focus to Flash object with keyboard, but can focus with JavaScript -
this question related (but distinct from) other question here: give focus browser
i have embedded flash object on page, , want included in tab cycle. i've set tabindex on it, works in firefox in google chrome , apple safari focus still slips past.
here's simple test code:
<a href="#" tabindex=1>a</a> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width=550 height=400 id=movie_name tabindex=1> <param name=movie value="http://helpx.adobe.com/content/help/en/flash-player/kb/find-version-flash-player/_jcr_content/main-pars/flash_1/file.res/thefile.swf"/> <embed src="http://helpx.adobe.com/content/help/en/flash-player/kb/find-version-flash-player/_jcr_content/main-pars/flash_1/file.res/thefile.swf" name=movie_name type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" tabindex=1 /> </object> <a href="#" tabindex=1>z</a> <button onclick="document.movie_name.focus()">force focus flash</button> (in fiddle: http://jsfiddle.net/tcdgq/)
everything has tabindex of 1 (i tried variations on 0, 0,1,2, etc), impossible focus flash object keyboard. clicking on works, pressing button, triggers simple bit of javascript. can tell if it's focussed mashing tab; never give focus via keyboard you'll never see highlight.
ok hack fix intercepts tab key , forces focus in particular situations, frankly that's hideous solution. there attribute i've missed here? i'm looking pure html fix if possible.
turns out known bug in webkit, , therefore effects both chrome , safari (not firefox, , have no idea internet explorer or opera)
the relevant tracker here: https://bugs.webkit.org/show_bug.cgi?id=32292
coincidentally, resolved few days ago, in public release soon. since both chrome , safari manage keep users up-to-date, don't think it's worth building workaround in meantime (but if have nice workaround, please post here!)
Comments
Post a Comment