[Project_owners] Flash, XUL Windows, and more
Brian King
brian at mozdev.org
Tue Oct 14 11:01:43 PDT 2008
Nathaniel Jayme wrote:
> this seems to work on GNU/Linux:
>
> <html>
> <body>
> Hello
> <input type="button" value="Clickme" onclick="udf_bClicked();" />
> <script type="text/javascript">
> var udv_bCanBlur = false;
> function udf_bClicked(){
> udv_bCanBlur = true;
> }
> function udf_bFocus(){
> if (udv_bCanBlur) return;
> window.focus();
> }
> window.addEventListener("blur",udf_bFocus,true);
> </script>
> </body>
> </html>
I tried (not too hard though) to integrate similar code on Mac with
XUL/JS but with no success. I think focus works different there because
if you notice that if you click on a background window you then have to
click it again to give it focus.
- Brian
More information about the Project_owners
mailing list