Control.Modal hidden scrollbar

When using the modal control (V2.2.1) to fetch content via AJAX, the horizontal scrollbar is not shown.

The #modal_container overflow is set to auto, and if the content overflows the right-padding expands as if the scrollbar has appeared, but alas no scrollbar. Only happens in Firefox 2 as far as I know.

Possibly a browser bug... any ideas?

Posted July 3rd, 2007 at 2:24pm by p-munky

Could you post screenshots or URLs and what browser this was happening in?

Posted July 4th, 2007 at 1:28pm by ryan

Ooops, I meant the vertical scrollbar. Excuse the blurred content - its proprietary client information. Notice in the screenshot below, the right hand padding is slightly wider than the left hand. This only happens when the scrollbar should be there - when then content fits in the window, the padding returns to equal size.

Posted July 5th, 2007 at 2:24pm by p-munky

Posted July 5th, 2007 at 2:26pm by p-munky

I am having the exact same issue in Firefox and have not been able to figure out how to get the scrollbar to show. I can scroll or page down. If I figure out a solution I'll post it back. Anyone else duplicating this issue?

Posted July 9th, 2007 at 12:29am by mrigotti

give the modal window a height to allow the scrollbar to appear automatically when the page reaches the height

/Jester

Posted July 9th, 2007 at 2:36am by jester

Giving the modal window a height doesn't make a difference. With or without, the content shifts right as if the scrollbar appears, but is not drawn to the screen.

Posted July 21st, 2007 at 7:49am by p-munky

This appears to be because of the z-index of the window being much higher than the z-index of the scrollbar controls. If one overrides the "zIndex" option to -1, the scrollbars reappear.

However setting the z-index to -1 appears to come with other complications such as detecting when the mouse clicks outside of the modal container -- who knows what else is affect by setting the z-index this low.

Also not sure if this is browser specific or not, but the issue is definitely on Mac/FF 2.0.

Posted August 5th, 2007 at 2:30pm by phil

Has anyone figured out a workaround for this? I have yet to find a better iframe/popup/lightbox library built on prototype (really, this one is great and I've tried a bunch). But this missing scrollbar in FF 2.0 on Mac is driving me nuts.

Posted October 12th, 2007 at 11:33am by abloom

Okay, we think we've solved this. The problem is that the #modal_overlay layer (the transluscent layer that covers the background content on modal popup) is using fixed positioning rather than absolute.

Towards the top of control.modal.js, change overlayStyles "position: 'fixed'," to "position: 'absolute',"

This seems to do the trick and seem to cause any new probs in major browsers. Though it may be valid to assign a z-index to a fixed layer, I can't come up with any reason why the overlay shouldn't be absolutely positioned in this context.

Hope that helps!

Posted November 6th, 2007 at 5:59pm by sixfoot6

  • this DOES NOT seem to cause any new problems in major browsers

Posted November 6th, 2007 at 6:00pm by sixfoot6

Login or Register to Post