Tuesday, March 23, 2010

History does not work correctly in...

It looks like there's a bug in history.js that makes Firefox work incorrectly with History when the %26lt;base%26gt; tag is set in the HTML that runs the Flex object.

We are not using the Flex-generated HTML, because of the way our application is built and one of the things that is different in the HTML that we run the Flex object in is the presence of the %26lt;base%26gt; tag.

The %26lt;base%26gt; tag is set in our case to http://www.ufxbank.com/fr, and the full URL of the page with Flex is http://www.ufxbank.com/fr/trading.aspx.

What happens is that the function setDefaultURL in history.js in its ''if (browser.firefox || browser.opera)'' part makes a call to ''window.location.replace'' with the value of ''#'', which in our case replaces the location to ''http://www.ufxbank.com/fr/#'', which brings a different page in the browser.

I had to replace the code in history.js to be ''var newloc = window.location + ''?#'' + def;'' instead of the original ''var newloc = ''#'' + def;''.

Does anyone has a better solution?

Is it a bug in the template that should be fixed?

No comments:

Post a Comment