The issue is, if IE (6.0+) , has flash content embedded in it, and the url of the page has a # somewhere in it, then when the flash content loads ,or if the user interacts with it, then the title of the window, changes to the content that is places after hash.
e.g http://adobeflashwebsite.com/index.html#somediv
Then the title of the page changes to 'somediv' , the moment a user will click on flash content, or many a times even the moment the flash content loads.
This happens only in IE.
This below is a very specific case I was facing:
The following is the environment I am facing issues with:
- Shinding engine to show an iGoogle like page
- Sammy.js
- Gadgets rendering flash/swf
The issue here is, no matter which plugin I try to embed flash with, I end up having the following problem
- When the flash loads completely, it appends something like #tab/xx , which actually is a string used by sammy to store the last navigational history within the page
- When, a user starts interacting with the flash, then the title is completely removed and only #tab/xx remains as the title.
- When a gadget is refreshed, even then there is issue like #2.
Could someone suggest, what the issue could be? Most probably is it related to sammy.js, as iGoogle doesn't have that issue.
The following workaround is the only way (till now) , that I got nearest to solving the issue:
It is IE bug:
If you are using sammy's
title
method you could delay the execution a bit to make it behave on IE.This won't solve it really, but I have noticed that a little delay helps IE sometimes.
I'm not really familiar with sammy.js but:
1) the Flash object is somehow 'taking ownership' of the title property.
OR
2) sammy.js is clearing the title value on HTML losing focus aka Flash gaining it (less likley and don't know why would someone do that)
If 1) -> define the title property in the Flash object itself (not a Flash user, dunno if it can be done easily)
If 2) -> the javascript is dumping a variable string value connected to the title property?
SUGGESTION:
Enclose your flash object in a new
<div>
element, assigning the<div>
a .click() event handler that changes the title property of a document. Try this:I'm a little late to the party but I prefer this approach:
This specifically changes the title back in the two events that ZeroClipboard changes it, rather than registering a listener on the document.onpropertychange event.