Files
tubestation/layout/reftests/css-scrollbars/scrollbar-thin-overflow-change.html
Xidorn Quan 8bccf06ea6 Bug 1514498 - Hide rather than collapse scrollbar thumb when scrollbar is disabled. r=NeilDeakin
Collapsing thumb causes frame of scrollbar to cache an incorrect pref
size, which makes it not able to appear in certain cases.

This patch changes it to use "visibility: hidden" instead so that the
thumb is hidden but still contributes to the width of scrollbar.

An alternative would be also change the code in nsScrollbarFrame to set
something other than collapsed attribute instead, but I'm not sure
whether doing that is any better than just adding a rule. We need the
rule anyway regardless of what we set on the element.

Differential Revision: https://phabricator.services.mozilla.com/D15244
2019-01-10 14:15:30 +00:00

23 lines
367 B
HTML

<!DOCTYPE html>
<style>
#outer {
scrollbar-width: thin;
overflow: auto;
border: 5px solid black;
background: black;
width: 200px;
height: 400px;
}
#inner {
height: 300px;
}
</style>
<div id="outer">
<div id="inner"></div>
</div>
<script>
// Force a reflow
document.body.offsetHeight;
document.getElementById('outer').style.height = '200px';
</script>