Closed Bug 100994 Opened 23 years ago Closed 23 years ago

Scrollbars are displayed on invisible <div> tags.

Categories

(Core :: Layout: Form Controls, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 92333

People

(Reporter: jeffh, Assigned: rods)

References

()

Details

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010801
BuildID:    20010913

If you create a <div> tag that contains a select box then changes its visibility
to hidden the scrollbars to the select box are still visible.

Reproducible: Always
Steps to Reproduce:
Included is a block of html that will create the problem described


Actual Results:  Not everything in the hidden div tag is invisible.

Expected Results:  Mozilla should have made the all contents of the div tag
invisible.

<html>
<head>
<script language=javascript>
var isOn = false;
var isFirst = true;
function initMD(){
    if(isFirst){
        isFirst = false;
    }
hideMD();
}
function hideMD(){
    document.getElementById('MD1').style.visibility='hidden';
}
function showMD(){
    if(document.getElementById('MD1').style.visibility == 'visible'){
        MD = document.getElementById('MD1').style.visibility='hidden';
        isOn = false;                        
    } else {
        MD = document.getElementById('MD1').style.visibility='visible';
    }        
}
</script>
</head>
<body>
mouse over&nbsp;<a href="javascript:void(0)" onMouseOver="showMD()">this</a>
<br><br>
<div id='MD1' style='position:absolute; visibility:hidden; left:100px;
top:100px; z-index:2'>
<select name =blah size=3>
<option>why</option>
<option>can</option>
<option>I</option>
<option>see</option>
<option>the</option>
<option>stinkin'</option>
<option>scrollbar?</option>
</select>
</div>
</body>
</html>
Reporter, it would help if you set up a test page, rather than quoting your HTML
& JS here.
Probably a duplicate of bug 92333
I've added a URL that has the test code on it.
Yea, this is because the SELECT has a native scrollbar, and when we hide the
containing DIV we just set the view to hidden, but that is not hiding the native
widget for the select. I'm not sure if we can fix this, but fortunately we are
changing the form controls to XBL so we won't have native scrollbars.

Reassigning to formcontrols, but probably won't fix. NOTE: the same problem
exists for a Plugin - it has a native widget too.
Assignee: attinasi → rods
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: Layout → HTML Form Controls

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