Bug 161148 - Scrolling occasionally broken in KMail's message view
Summary: Scrolling occasionally broken in KMail's message view
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml renderer (show other bugs)
Version: SVN
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 161193 161563 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-04-22 13:09 UTC by Alex Merry
Modified: 2008-05-20 20:04 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of the behaviour (95.07 KB, image/png)
2008-04-22 13:11 UTC, Alex Merry
Details
Workaround for KMail (569 bytes, patch)
2008-05-14 21:28 UTC, Alex Merry
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Merry 2008-04-22 13:09:46 UTC
Version:           r799768 (using Devel)
Installed from:    Compiled sources
Compiler:          gcc 4.3.0 
OS:                Linux

Steps to reproduce (happens every so often - about 5% of the time?):

1. Select a message in the message list
2. Scroll down in the message view
3. Move to another message in the message list

Then every so often the new message will be scrolled down the same distance as the previous message, but the scrollbar is at the top.  The result is that it is impossible to view the top of the message.

After this happens, it stays that way until KMail is quit and reopened.
Comment 1 Alex Merry 2008-04-22 13:11:05 UTC
Created attachment 24477 [details]
Screenshot of the behaviour

This shows the result of the problem.  Note that the fancy headers and the top
part of the message are not displayed, despite the scrollbar being at the top.
Comment 2 Alex Merry 2008-04-22 13:13:19 UTC
It appears that using the arrow keys on the keyboard to scroll down (rather than the mouse wheel or scrollbar directly) fixes the issue after the second press (ie: the pane jumps back up to be aligned with the scrollbar).
Comment 3 Thomas McGuire 2008-04-22 18:36:29 UTC
Hmm, confirmed.
It used to work correctly and I'm not aware of any changes of the message viewer.

Maybe this could be some KHTML regression, not sure. Might also be KMail's fault though.
Comment 4 Thomas McGuire 2008-05-02 13:36:49 UTC
Reassigning this to KHTML. I guess this problem is caused by the recent work on the KHTML scrolling code.
Might be related to bug 157883.
Comment 5 Thomas McGuire 2008-05-03 12:52:36 UTC
This problem also affects KNode.
Comment 6 Thomas McGuire 2008-05-04 13:59:32 UTC
*** Bug 161563 has been marked as a duplicate of this bug. ***
Comment 7 Maksim Orlovich 2008-05-10 17:32:47 UTC
Germain, could you please take a look?
Comment 8 Andrew Stromme 2008-05-10 19:03:26 UTC
I want to note that this happens 100% of the time (if you scroll all the way to the bottom in the view pane) in the current svn for akregator.
Comment 9 Thomas McGuire 2008-05-11 16:17:22 UTC
A workaround for this is to start KMail (or the other apps) with
QT_NO_FAST_SCROLL=1
Comment 10 Thomas McGuire 2008-05-13 21:02:30 UTC
This is a showstopper for KMail.
Please, can anyone have a look?
Comment 11 Germain Garand 2008-05-14 07:48:34 UTC
I'll have time to investigate after feature freeze (19th)..
Some questions that could help :
- Is comment #9 accurate?
- Does smooth scrolling mode make a difference? 
  (can be programatically set with view()->setSmoothScrollingMode(x)
  where x is KHTMLView::SSMDisabled or KHTMLView::SSMEnabled)
- Does disabling alien widgets change things? (QT_USE_NATIVE_WINDOWS=1)
- did this problem appear around the time this bug report was written or long
  before?

Comment 12 András Manţia 2008-05-14 08:43:22 UTC
On Wednesday 14 May 2008, Germain Garand wrote:
> - did this problem appear around the time this bug report was written
> or long before?


I can answer this: the bug is relatively new, appear around a month ago, 
when it was reported. Things were going fine after you fixed the Qt4 
regressions in KHTML, but after a while this scrolling bug was 
introduced.
Comment 13 Alex Merry 2008-05-14 12:45:04 UTC
QT_NO_FAST_SCROLL=1 and QT_USE_NATIVE_WINDOWS=1 both have no effect here.

I can't replicate it if I disable smooth scrolling with view()->setSmoothScrollingMode(KHTMLView::SSMDisabled);
Comment 14 Alex Merry 2008-05-14 21:28:06 UTC
Created attachment 24769 [details]
Workaround for KMail

This one-liner disables smooth scrolling in kmail, which appears to stop the
problem occurring.
Comment 15 Thomas McGuire 2008-05-15 15:34:37 UTC
> This one-liner disables smooth scrolling in kmail, which appears to stop the 
> problem occurring. 
Thanks! Please commit this, with a quick comment in the code explaining the reason (with link to this bug report).
Comment 16 Alex Merry 2008-05-15 15:56:55 UTC
SVN commit 808046 by alexmerry:

Work-around for a scrolling bug.

CCBUG: 161148



 M  +5 -0      kmreaderwin.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=808046
Comment 17 Urs Wolfer 2008-05-15 20:56:43 UTC
SVN commit 808123 by uwolfer:

also apply workaround for smoothscrolling-issues for Akregator
CCBUG:161148

 M  +3 -0      articleviewer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=808123
Comment 18 András Manţia 2008-05-16 12:19:08 UTC
On Thursday 15 May 2008, Urs Wolfer wrote:
> also apply workaround for smoothscrolling-issues for Akregator


I somewhat disagree with this workarounds. That doesn't make the bug go 
away and any other user of khtml will hit it sooner or later. I just saw 
an example where similar problem happens with scrolling inside 
Konqueror. (Sorry, I cannot give the link, it is on a private server).
So better fix khtml (or whatever this causes) and   - if this will not 
happen - enable the workaround only in late bet stage, when it is clear 
that the real solution will not appear in time.
Comment 19 Michael Pyne 2008-05-17 21:14:13 UTC
*** Bug 161193 has been marked as a duplicate of this bug. ***
Comment 20 Germain Garand 2008-05-20 05:11:20 UTC
SVN commit 810119 by ggarand:

Better tracking/restoration of contents coordinates
when performing a smooth scroll.

I think these could go out of sync causing #161148, though I can't
immediately verify if this patch fixes the issue.

Please test...

CCBUG: 161148


 M  +15 -5     khtmlview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=810119
Comment 21 Urs Wolfer 2008-05-20 20:04:40 UTC
SVN commit 810426 by uwolfer:

Remove workaround again in KMail and Akregator as it seems to work after fix in rev 810119.
BUG:161148

 M  +0 -3      akregator/src/articleviewer.cpp  
 M  +0 -6      kmail/kmreaderwin.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=810426