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
_______________________________________________
Project_owners mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/project_owners

Reply via email to