Bug 415096

Summary: Erratic scrolling behavior in KTextEditor
Product: [Frameworks and Libraries] frameworks-ktexteditor Reporter: Ongun Kanat <ongun.kanat>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate, ongun.kanat
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Kate
Geany
Notepadqq

Description Ongun Kanat 2019-12-12 15:21:09 UTC
Created attachment 124445 [details]
Kate

SUMMARY
I have a ElanTech multi-touch touchpad with two-finger vertical / horizontal scrolling support. I use Synaptics X11 driver.

If a text file with lines longer than the view frame of KTextEditor is loaded, I encounter a weird diagonal scrolling behavior when I scroll vertically. I don't mean small amounts of horizontal scrolling caused by hand.

I don't encounter this problem with other Qt and GTK text editors.

Videos of Kate, Geany and Notepadqq when I am scrolling using the same gesture / hand position is attached.

STEPS TO REPRODUCE
1. Load a text file with long lines or resize the window of a editor which uses KTextEditor (Kate, Kwrite etc.)
2. Try scrolling vertically

OBSERVED RESULT
KTextEditor scrolls both vertically and horizontally

EXPECTED RESULT
KTextEditor should scroll vertically a negligible amount of horizontal scrolling is acceptable.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 5.17.4
KDE Frameworks Version: 5.64.0
Qt Version: 5.13.2
Comment 1 Ongun Kanat 2019-12-12 15:22:05 UTC
Created attachment 124446 [details]
Geany
Comment 2 Ongun Kanat 2019-12-12 15:22:27 UTC
Created attachment 124447 [details]
Notepadqq
Comment 3 Kåre Särs 2019-12-27 09:49:42 UTC
Git commit 92e5b0b9aac021a9e9d93b65240333c9f56bb0a5 by Kåre Särs.
Committed on 27/12/2019 at 09:45.
Pushed by sars into branch 'master'.

Avoid unwanted horizontal scrolling

Summary:
It looks like the horizontal scrolling is a bit too sensitive while
also scrolling vertically. This patch disables horizontal scrolling
if the vertical wheel event value is larger than the horizontal.

Subscribers: kwrite-devel, kde-frameworks-devel

Tags: #kate, #frameworks

Differential Revision: https://phabricator.kde.org/D26071

M  +6    -0    src/view/kateviewinternal.cpp

https://commits.kde.org/ktexteditor/92e5b0b9aac021a9e9d93b65240333c9f56bb0a5