If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Horizontal scrollbar move to left side when reload current page

RESOLVED DUPLICATE of bug 99094

Status

SeaMonkey
General
RESOLVED DUPLICATE of bug 99094
16 years ago
13 years ago

People

(Reporter: Hideo Saito, Assigned: asa)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

16 years ago
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Set Horizontal Scrollbar and Vertical Scrollbar to right side and bottom side.
<TABLE BORDER="1" CELLPADDING="0" CELLSPACING="0" WIDTH="1400" HEIGHT="1400" ALI
GN="left"><TR><TD>
</TD></TR></TABLE>
<BR>And reload current page.
</body></html>

In case of this simple HTML, Horizontal Scrollbar and Vertical Scrollbar
move to left side from right side and short distance up from bottom side.
(Reporter)

Comment 1

16 years ago
Created attachment 76382 [details] [diff] [review]
do not move Scrollbar when Reload

I test mozilla-0.9.8 on NetBSD.
(Reporter)

Comment 2

16 years ago
Summary is "Horizontal scrollbar move to left side when reload current page".
Summary: In case of this simple HTML, Horizontal Scrollbar and Vertical Scrollbar → Horizontal scrollbar move to left side when reload current page
(Reporter)

Comment 3

16 years ago
Created attachment 76383 [details]
simple HTML

Comment 4

16 years ago
Yes, in my opinion, for consistency, either the horizontal bar shouldn't be
resetted to the left or the vertical bar should be resetted to the top as well.

btw, confirmed on build 2002032503 win98

Comment 5

16 years ago
Marking as a dupe of bug 99094.  Bug 99094 does not mention the very small
change in the vertical scroll bar, I will add a comment to that bug along with
this testcase.  Please un-dupe of you disagree.

*** This bug has been marked as a duplicate of 99094 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE
(Reporter)

Comment 6

16 years ago
Created attachment 76698 [details] [diff] [review]
2nd patch of scroll to correct position with Reload

I found a bug in my patch with Japanese URL
 "http://bugzilla.mozilla.gr.jp/reports.cgi".

In case of this page, the vertical scroll bar moved up
 a very small amount from bottom side with Reload botton.

Because the height of this page is narrow from first to just
 before page was loaded.
When this page was loaded and the height grew to correct length,
as a result of the vertical scroll bar shrank, the vertical scroll bar moved up
a very small amount.

This patch permit to scroll when the height grew finaly.

--- layout/xul/base/src/nsScrollBoxFrame.cpp.org	Wed Jan 23 11:53:02
2002
+++ layout/xul/base/src/nsScrollBoxFrame.cpp	Fri Mar 29 12:39:00 2002
@@ -523,6 +523,7 @@
       scrollingView->GetScrollPosition(x, y);
 
       // if we didn't move, we still need to restore
+    again:
       if ((x == mLastPos.x) && (y == mLastPos.y)) {
	 nsRect childRect(0, 0, 0, 0);
	 nsIView* child = nsnull;
@@ -556,8 +557,9 @@
       }
       else {
	 // user moved the position, so we won't need to restore
-	 mLastPos.x = -1;
-	 mLastPos.y = -1;
+	 mLastPos.x = x;
+	 mLastPos.y = y;
+	 goto again;
       }
     }
   }
 
Sometimes this page's view of right side dameged,
then this patch is effective.

--- view/src/nsViewManager.cpp.org	Wed Jan 23 12:32:45 2002
+++ view/src/nsViewManager.cpp	Fri Mar 29 12:29:48 2002
@@ -2247,6 +2247,10 @@
	  
 
	 view->SetDimensions(width, height);
+	 nscoord maxWidth = (oldWidth < width ? width : oldWidth);
+	 nscoord maxHeight = (oldHeight < height ? height : oldHeight);
+	 nsRect boundingArea(x, y, maxWidth, maxHeight);
+	 UpdateView(parentView, boundingArea, NS_VMREFRESH_NO_SYNC);
       } 
     }
   }
(Reporter)

Comment 7

16 years ago
My 1st patch "do not move Scrollbar when Reload" is obsolete.

If you test my 2nd patch, this patch is effective for web-page only.
The scroll bar both can move to correct position with the
reload, back or forward botton.

In case of internal link of document page, not effecive.
It seems that the scroll position of internal linked page can not be restored.
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.