Closed Bug 293127 Opened 16 years ago Closed 16 years ago

CSS Overflow:Auto does not hide the scrollbars when called from a hidden DIV tag

Categories

(Firefox :: General, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 187435

People

(Reporter: mark.bingley, Unassigned)

Details

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-0; en-US; rv:1.7.7) Gecko / 20050414 Firefox/1.0.3

If you use the CSS Overflow:Auto, and call this class from a <div> tag that 
has its visibility set as Hidden, the scrollbar is still visible on the page 
when it is loaded up. If you make the <div> tag visibile at a new location on 
the page, then hide it, the scrollbar is left behind, and still works ! 

Reproducible: Always

Steps to Reproduce:
1.Create a class in CSS that has visiblity:hidden and overflow:auto, and 
restrict its height to (say) 100px
2.Call that class from a <div> tag in HTML.
3.Fill it up with more than 100px worth of content, so you force the overflow 
attribute to kick in
4.View the HTML page, and you will see the scroll bar is visible, even though 
the <div> tag content is not.
5.Use javascript to unhide the <div> and move it around and you close it 
again, and you will see that the scrollbar remains visible all the time.

Actual Results:  
The scroll bar remains visible, and conflicts with other content on the page.

Expected Results:  
The scroll bar for the <div> tag, that occurs due to the overflow:auto  
attribute, should disappear along with the rest of the <div> tag content when 
its visibility is set to hidden. (It does this correctly on the PC version)

There is a temporary workaround for this, which involves writing a javascript 
function that changes the "overflow:auto" to "overflow:hidden" at the same 
time as making the <div> tag hidden(and reverse this when making it visible). 
This does work, but is a whole load of specific code just for this particular 
browser/platform combination, so should only really be used if absolutely 
neccassary. I can provide an example of this workaround code is required.

*** This bug has been marked as a duplicate of 187435 ***
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.