Site Navigation

Showing posts with label resize. Show all posts
Showing posts with label resize. Show all posts

Saturday, November 29, 2008

bug 375 - no window.onresize event in IE8 Beta 2

Issue: #375
Affects: IE8 Beta 2, IE8 PR1, IE8 RC1
MSIE Feedback ID: 410707

MSIE Feedback ID: 390166

MSIE Feedback ID: 377719

MSIE Feedback ID: 364571

Note: There was a partial fix in IE8 RC1 however iframes still do not fire resize events properly.

When IE8 Beta 2 shipped it was a significant improvement over Beta 1 - quite simply by the fact that it was actually usable!

There is however a regression bug (that MS claims is fixed in their internal builds moving towards a Q1,2009 RC1 release) with the window.resize event never, ever firing!

As a result, any attempt to capture this event and execute some JavaScript logic on it will fail. Hopefully this will be fixed in the RC release... but we are wondering... does this mean (bug 104) will also be fixed? or will it behave like IE7 did? or IE6 did?



Known Workarounds: None.



Related Issues: One. (bug 104)

Bug/Site Feedback |
Submit a bug

Monday, October 29, 2007

bug 104 - resize event firing errors in IE on Maximize or Restore

Issue: #104
Affects: IE5, IE5.5, IE6, IE7, IE8 Beta 1, IE8 Beta 2, IE8 PR1, IE8 RC1
Partially Fixed in: IE7 & IE8* (see details below)
Fixed in: IE9 RC 1 (in IE9 standards mode only)

The resize event when applied to the window, will fire when the browser is resized.

In IE, it fires continually while stretching a window, and in other browsers only when the dragging stops and a new window size is set. (this isn't the bug, just a minor difference in the way each browser works)

The bug, is that IE will fire multiple resize events for a single resize of the browser, when Maximizing or Restoring the window.

In IE6, a Maximize or Restore window setting will trigger 3 (three!) resize events.

You can do this by right-clicking the task bar and choosing from the context menu, or by double-clicking the title bar of the browser.

In IE7, they fixed this! Well, not quite. In IE7, it now fires 2 (two!) resize events. Well, I suppose that 1 invalid resize event, is better than 2 invalid resize events, but suffice to say, there is still a significant bug here. This incorrect behavior is still seen in IE8 builds up until IE8 RC1.


Example:

<script>
window.onresize = function(){
alert('resizing: Offset: ' +
document.body.offsetWidth + ', ' +
document.body.offsetHeight +
'\nScroll: ' +
document.body.scrollWidth + ', ' +
document.body.scrollHeight);
};
</script>



Known Workarounds: None. If you need to ensure that a function is called only once for this kind of resize, you may want to store the current width and height dimensions as variables, then onresize, compare them against the stored size. If they are both a match, ignore the event. (e.g. there was no resize)


Related Issues: None.