Object Focus problem with Safari and Chrome browsers

前端 未结 5 2150
野的像风
野的像风 2020-12-17 23:22

I have the following javascript being called to request a focus when page is loaded.

This code works 100% OK with Firefox and IE7, but Chrome and Safari do not seem

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-17 23:59

    It took me hours searching the Internet, but finally I found a solution that works on the lastest versions of IE, Firefox, Chrome and Safari. The following code solves the problem for good:

    
      
      
    
    
    

    This example assumes the flash is embedded using the SWFObject library. If not, you should set the f variable to the Object or Embed tag which holds the flash movie.

    Edited on 5 May 2012: Well, unfortunately it seems that the tabIndex workaround no longer works for all combinations of browser (Chrome/Safari) and operating system. For instance, currently Chrome 18 on Windows fails.

    See the link below, provided by Christian Junk, to get the status of the problem's resolution.

提交回复
热议问题