[webkit-help] Giving keyboard focus on a flash video.
Matt Bockt
bocktmatt at gmail.com
Wed Sep 16 08:50:15 PDT 2009
Hi !
I have a flash movie that is embedd in an html page, and I want it to have
the keyboard focus as soon as the page is loaded.
With the following HTML code, it works fine on IE and Firefox, but not on
WebKit.
<HTML>
<body onload="document.getElementById('VIDEO').focus();">
<OBJECT
wmode="opaque"
id="VIDEO" name="VIDEO"
width="800" height="600"
style="position:absolute; left:0;top:0;"
type="application/x-shockwave-flash"
data="mt.swf">
<PARAM NAME="MOVIE" VALUE="mt.swf">
</OBJECT>
</body>
</HTML>
The "onLoad" event is well received and the
"document.getElementById('VIDEO')" works. Indeed, if I replace "<body
onload="document.getElementById('VIDEO').focus();">" with "<body
onload="alert(document.getElementById('VIDEO').data)">" the alert returns
the name of the file to be played.
So, looks like the ".focus()" does'nt actually give focus to the embed flash
video...
Am I missing something in the way to embed the flash video or is it a
limitation of webkit ??
I also read during my searches on google, that giving the focus to a flash
video was quite impossible from a non-IE browser, but these posts were
sometime outdated (2005-2006......)
But since it works now on a firefox 3.0.4, I wonder why it doesn't work on
WebKit too.
Thank you to help me making the light about all this.
PS : I'm running a *WebKit r44815* on *Fedora10*.
--
matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20090916/db343327/attachment.html>
More information about the webkit-help
mailing list