Bug 32215 - scroll position not maintained properly during loading or resizing
Summary: scroll position not maintained properly during loading or resizing
Status: CLOSED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Mandrake RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-09-08 00:48 UTC by wayne
Modified: 2008-05-13 13:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wayne 2001-09-08 00:43:39 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           konqueror
Version:           KDE 2.2.0 
Severity:          normal
Installed from:    Mandrake RPMs
Compiler:          Not Specified
OS:                Linux
OS/Compiler notes: Not Specified

Konquerer does not maintain the proper scroll position when a page is loading images or being resized.  For instance visit this page:

http://www.clari.net/~wayne/scrollbug.html#8

Notice that there is an offset that should position the page at image #8.  Since the images have not yet been loaded (and their sizes are not yet known) the browser positions the page at the text for Image #8 and then the loading images bump the page down so that image #4 (or so) is at the top not image #8.  (For some strange reason putting the cursor into the address field and pressing return will take you to the right spot on the page but pressing reload will return you to the wrong spot.)

A similar problem occurs when resizing the page.  The page should be trying to keep what's displayed on the current page visible (as much as possible) but instead everything slides up or down making it very hard to find your previous spot (unless you just happen to be at the top of the whole web page).  A better page to demonstrate this problem would be to browse a very large documentation page and attempt to make the window a little wider while reading somewhere near the middle).

The underlying problem is that Konquerer (and other browsers) are not handling the scroll position using the right idiom.  Typically an application will remember a scroll-bar offset and blindly apply that offset to the document position however the length of the document may change.  A much better solution is to make a note of what material is being displayed in the top-left corner of the browser window (perhaps using a pointer to a DOM object with some kind of in-object offset?) and keeping that position constant when the size of the document changes (i.e. changing the scroll-position value).

(Submitted via bugs.kde.org)
Comment 1 Daniel Naber 2002-03-24 14:22:39 UTC
Thank you for your bug report.
This bug can not be reproduced using the current development (CVS) version
of KDE. This suggests that the bug has already been fixed. The bug report=
=20
will be
closed.


--=20
http://www.danielnaber.de
Comment 2 Jason B. 2004-06-07 08:56:38 UTC
As to the "Scroll position changes after window resize on large page" aspect of this bug report, I can confirm its annoying existence in Konqueror 3.2.2 on Gentoo. 

A testcase could be a large page such as a slashdot discussion: http://ask.slashdot.org/comments.pl?sid=110124&threshold=3&mode=nested&commentsort=0&op=Change

With your window maximized scroll half way down the page. Then resize your browser to say half the width. Your position on the page is now different, meaning that you now have to find where in the page you were reading. Note that if you return the browser to its original size you will be back at your original position before resizing the browser smaller.
Comment 3 Jason B. 2004-06-07 09:02:26 UTC
Note: Part of my previous comment does not display for me unless I click on the 'Format For Printing' link.
Comment 4 James 2005-01-29 22:50:39 UTC
I've noticed this problem too. Try this to recreate it:

* Resize your browser window to around 1024x768 (or smaller)
* Visit this URL: http://www.yakyak.org/viewtopic.php?t=31319
The page contains one entry at the top of the page containing several images, followed by a few screens of text.

* Quickly, /before the images load/, scroll past them to the bottom of the page.
Now watch as the page jumps around as each image is loaded.

When reading web-based forums, it's a very common procedure to quickly skip right to the bottom of a page to read the newest posts. However if older posts at the top contain images, you end up with your browser jumping around while it resizes the page after each image is loaded.

Somehow the browser needs to know where in the page you're looking, and do its best to keep that on the screen while the page finishes loading, even if that means the size of the page changes due to large images being inserted where the standard 16x16 placeholder is located.
Comment 5 Maciej Pilichowski 2007-04-20 15:21:43 UTC
Does anyone know why this report is closed as FIXED? And what's more without any comment -- I am asking because it is not fixed at all.

This report qualifies for reopening.
Comment 6 FiNeX 2008-05-13 13:53:10 UTC
@Maciej: The bug has been fixed on KDE 4. Probably developers doesn't want to backport on 3.5.
Comment 7 Maciej Pilichowski 2008-05-13 13:59:58 UTC
FiNeX, thank you for clarification.