Closed
Bug 48218
Opened 25 years ago
Closed 24 years ago
scrolls incorrectly after appending text
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
FIXED
Future
People
(Reporter: greg, Assigned: jst)
Details
Attachments
(1 file)
|
963 bytes,
text/html
|
Details |
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m17) Gecko/20000807
BuildID: 20000080712
If I call scrollTo or scrollBy immediately after appending text, it doesn't
scroll to the end of the newly appended text. I can work around this by using a
timer to delay the call to the scrolling code.
Reproducible: Always
Steps to Reproduce:
1. Load up the page shown below and make your window sort-of-short.
2. Press the 'AppendAndScroll' button until you see the window scrolling.
Notice that it doesn't scroll to the end of the text.
3. Press the 'AppendWaitAndScroll'. Notice that it scrolls to the end of the text.
Actual Results: It doesn't scroll all the way to the end if I press
'AppendWaitAndScroll'
Expected Results: It should scroll to the end of the newly appended text.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<SCRIPT>
var lineNo = 0;
function appendLine () {
lineNo += 1;
var text = 'line ' + lineNo + '<br>';
var myDoc = window.document;
var range = myDoc.createRange();
range.selectNode(myDoc.body);
range.collapse(false);
var fragment = range.createContextualFragment(text);
myDoc.body.appendChild(fragment);
}
function scrollFar () {
window.scrollBy(0, 99999);
}
function appendAndScroll () {
appendLine();
scrollFar();
}
function appendWaitAndScroll () {
appendLine();
setTimeout('scrollFar()', 5);
}
</SCRIPT>
<title>Appender</title>
</head>
<body>
<h1>Appender</h1>
<BUTTON ONCLICK="appendLine();">
AppendLine
</BUTTON>
<BUTTON ONCLICK="scrollFar();">
ScrollFar
</BUTTON>
<BUTTON ONCLICK="appendAndScroll();">
AppendAndScroll
</BUTTON>
<BUTTON ONCLICK="appendWaitAndScroll();">
AppendWaitAndScroll
</BUTTON>
<hr>
</body>
</html>
Comment 1•25 years ago
|
||
Confirmed with 080908 mozilla build on NT. Setting bug status to NEW. Over to DOM 0
Assignee: asa → jst
Status: UNCONFIRMED → NEW
Component: Browser-General → DOM Level 0
Ever confirmed: true
QA Contact: doronr → desale
| Assignee | ||
Comment 2•25 years ago
|
||
| Assignee | ||
Comment 3•25 years ago
|
||
This bug has been marked "future" because the original netscape engineer
workingon this is over-burdened. If you feel this is an error, that you or
another known resource will be working on this bug,or if it blocks your work in
some way -- please attach your concern to the bug for reconsideration.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
| Assignee | ||
Comment 4•24 years ago
|
||
This one was fixed today with my checkin for bug 58285, marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•