Closed
Bug 577760
Opened 14 years ago
Closed 14 years ago
scrollbar reset horizontally or vertically on a scroll when overflow-x or overflow-y is set to hidden
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
DUPLICATE
of bug 386444
People
(Reporter: ven.guddanti, Unassigned)
Details
(Keywords: testcase)
Attachments
(3 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)
In a div if style="overflow-y:hidden; overflow-x:auto" and the div is scrolled programatically using div.scrollTop=[scrollvalue], the vertical scrollbar resets to 0 position as the user scrolls. The same thing happens the other way round for the horizontal position. A sample is attached in the additional Information.
This is not an issue in IE or Safari/Chrome
Reproducible: Always
Steps to Reproduce:
1. Save the sample in additional information to a html file
2. Click on scroll button to scroll the div vertically to a location.
3. Scroll the div horizontally using the scrollbar
Actual Results:
Div scrollbars scrollTop changes 0.
Expected Results:
Div scrollbars scrollTop should not change.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>scroller test</title>
</head>
<script>
var isIE = (document.all != null);
function doScroll(e)
{
if(!e)
e = window.event;
var scrollVal = parseInt(document.getElementById("scrollTo").value);
if(scrollVal > -1)
document.getElementById("outer").scrollTop = scrollVal;
if(isIE)
event.cancelBubble = true;
else
e.stopPropagation();
}
</script>
<body style="margin:0px; width:100%; display:block; position:absolute;left:0px;">
<form>
<div id="outer" style="position:relative; width:200px; height:150px; overflow-x:auto;overflow-y:hidden;">
<div id="inner" style="position:relative; width:300px; height:400px;">
Some text Some textSome textSome textSome textSome textSome textSome
text Some text Some textSome textSome textSome textSome textSome textSome text
Some text Some textSome textSome textSome textSome textSome textSome
text Some text Some textSome textSome textSome textSome textSome textSome text
Some text Some textSome textSome textSome textSome textSome textSome
text Some text Some textSome textSome textSome textSome textSome textSome text
Some text Some textSome textSome textSome textSome textSome textSome
text Some text Some textSome textSome textSome textSome textSome textSome text
Some text Some textSome textSome textSome textSome textSome textSome
text Some text Some textSome textSome textSome textSome textSome textSome text
</div>
</div>
<div>
<input type="text" id="scrollTo" value="20"/> <button onclick="doScroll(event); return
false">scroll</button>
</div>
</form>
</body>
</html>
Reporter | ||
Comment 1•14 years ago
|
||
Mozilla/5.0 (Windows; Windows NT 5.1; en-US; rv:2.0b2pre) Gecko/20100709 Minefield/4.0b2pre
Confirmed. This bug is old, testcase works in WebKit, Opera, IE.
(Don't know the right component, sorry)
Status: UNCONFIRMED → NEW
Component: General → Layout
Ever confirmed: true
Keywords: testcase
Product: Firefox → Core
QA Contact: general → layout
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•