Internet Explorer, zooming and resize events

My current project (cat4trad) for the European Parliament, which involves heavily GWT and javascript in bringing a seamless user experience to translators, we frequently run into issues with different browsers. The one I run into today was about a window resize event not being detected by IE8 and IE9.

This simple test should always print an alert when the browser window is resized or the zoom factor is changed:

window.onresize = function(event) {
    alert("resize");
}

But for IE, it doesn’t always fire in the case of zooming. It seems that Internet Explorer suppresses the window resize event when the document content does not fill out the entire page. To make things worse, that document content must be inline – absolute positioned elements don’t count.

Once we found out, the solution was rather simple: fill up the page with
tags.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.