#41 ✓invalid
Derek

IE7 Horizontal Scrollbar Bug

Reported by Derek | January 2nd, 2009 @ 12:05 PM | in 1.0

There is a known bug with IE7 where absolute positioned elements that don't have a width specified can trigger it to display a horizontal scrollbar even though it is unnecessary.

The IFrame Shim that livepipe uses seems to trigger this bug mostly in cases where the shim is shown before it is given position. There were 2 places that were giving me problems with Control.Modal.

The first was with the overlay. The positionIFrameShim function of Control.Overlay looks like:


positionIFrameShim: function(){
if(Control.Overlay.container.visible())
    Control.Overlay.iFrameShim.positionUnder(Control.Overlay.container);
}

The problem is that on the first time the overlay is shown, this position function is called before the overlay is made visible and thus the positionUnder function of the IFrameShim class is not called. In IE7 this can trigger the scrollbar bug. I commented out the if statement but there is probably a more suitable solution.

The second place I encountered a problem was with the actual modal window itself. A scrollbar would appear momentarily and then go away. The updateIFrameShimZIndex function is being called twice when the window first opens and you are using the fade option.

The finishOpen function starts the fade effect which calls updateIFrameShimZIndex on completion. The finishOpen function calls the position function after it starts the effect however. It is unlikely but the effect could finish before position is called, thus triggering the scrollbar bug because the position of the iframe is set to the undefined position of the window. I thus moved the call to position up to the top of the finishOpen call so we know the window has been positioned before showing it.

The end of the position function also calls updateIFrameShimZIndex though. Strangely, when this is called and the window is not actually visible yet, the IE7 bug is triggered even though the element has in fact been positioned. I thus changed the end of the position function to read:


if(this.iFrameShim && this.isOpen)
     this.updateIFrameShimZIndex();

This ensures the window is open before trying to position the shim.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

NOTE: Please do not open tickets here. If you have an issue, please open it on http://github.com/syntacticx/livepipe-ui/issues/

High quality widgets and controls for web 2.0 applications built using the Prototype JavaScript Framework. Each control is well tested, highly extensible, fully documented and degrades gracefully for non JavaScript enabled browsers where possible. MIT licensed and actively maintained.

People watching this ticket

Pages