even713 发表于 2013-1-24 21:01:18

IE bug--appending hash to title when a page include any flash

What steps will reproduce the problem?
1. Including any flash in a page, dynamically or not
2. Redirecting to the page with a hash in its url http://url#hash
3. In IE7 the tabs and windows title are changed appending the #hash to the
window's/tab title
What is the expected output? What do you see instead?
In all other browsers the title remains unmodified, only in IE the #hash is
appended into the title.
What version of the product are you using? On what operating system?
All swfobject versions i tried will reproduce it
Please provide any additional information below.
This is a Flash reported bug and also in IE, after googling a bit I thought
that there was a way to make a workaround for this. I just added this timer
in the createSWF function, just for IE
// Try to clean windows title in IE
    // http://bugs.adobe.com/jira/browse/FP-240
    try{
     var wT = doc.title // get the title before being bug
     // clean the title if needed
     if(wT.indexOf('#')!=-1) wT=wT.substring(0,wT.indexOf('#'));
     var iv = setInterval(function () {
       // Whenever its loaded just push in the old title again
       if (r.readyState == 4) {
        clearInterval(iv)
        doc.title = wT;
       }
      }, 100)
    }
    catch(e){ }

Hope helps someone
页: [1]
查看完整版本: IE bug--appending hash to title when a page include any flash