Monday, October 19, 2009

IE8 Image is undefined part 2

In response to my last post about IE8 having issues with pop-up windows where the 'Image' object is undefined I was able find another fix for this issue.

While I was searching for information on this topic I stumbled across this entry on Microsofts forums. The fourth comment down, by the user 'Fattymelt', stated that he was able to resolve the issue by simply removing the call to 'focus' of the pop-up.

var pop = window.open(...);
pop.focus(); // removing this prevents the Image from being undefined

Wellll... It did prevent the issue, but it doesn't look like it's the 'focus' function that's causing it. 'blur' also caused the issue along with everything else I called from the 'window.open' object. Not just function calls either, a simple check against the 'closed' property also yielded the issue.

So, it looks there are two options to get around this issue..
1. Do the iframe hack from my previous post.
2. Don't make any calls to the 'window.open' object

As a side not I tried to post some of these results to the MS forums thread above, but everytime I click the reply link in the forum it takes me to my profile. I can't seem to post any replies to any threads... :(

4 comments:

BlackTigerX said...

very interesting, I would go back to your initial steps to reproduce this, specifically on

2. On the server, during the request for the new window, do a redirect to the same page

I would look at the headers there and look for any differences from the initial request, how is the redirect being done from the server?

jr said...

We checked all of that with the initial reproduction of the issue. We initially thought that there must be some difference with the requests/responses. There where no differences. And it only manifests itself with IE8, no previous versions or other browsers.

This issue has been reported with certain add-ons as well with IE8 only.

快車 said...

我在戀愛著?--------是的,因為我在等待著..................................................

皮東 said...

If you can not be kind, at least have the decency to be vague.............................................