Bug 476484

Summary: Touch swipe scrolling in ScrollablePage does not work over SelectableLabel text
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Tammes Burghard <kde>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: bart, me, nate, notmart
Priority: NOR    
Version First Reported In: 5.109.0   
Target Milestone: Not decided   
Platform: Flatpak   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.0
Sentry Crash Report:

Description Tammes Burghard 2023-11-02 21:28:36 UTC
SUMMARY
***
I use Kasts on my surface tablet running fedora silverblue and have several touch issues. This bug is for the first one: 

When I try to scroll the main ScrollablePage via touch, it works great as long as the ScrollablePage contains a GridView or ListView. But when it contains text, swiping over it selects the text instead of scrolling which is weird.
***


STEPS TO REPRODUCE
1. Use Kasts on a tablet with pen
2. Open the Episodes Page with your finger
3. Open a single episode that has a page filling (long enough) description
4. Try to scroll by swiping over the text

OBSERVED RESULT
Text is selected

EXPECTED RESULT
The page gets scrolled

SOFTWARE/OS VERSIONS
Linux: Fedora Silverblue
Kasts: 23.04.3 as a Flatpak
KDE Frameworks Version: 5.109
Qt Version: 5.15.10
Tablet: Microsoft Surface Go 2
Pen: Microsoft Surface Pen
Comment 1 Tammes Burghard 2023-11-02 21:36:54 UTC
The same applies for swiping with the pen, but there, selecting text is fine with me.
Comment 2 Nate Graham 2023-11-03 21:45:40 UTC
Can still confirm in Plasma 6 Wayland.
Comment 3 bart 2024-01-30 09:09:35 UTC
Couldn't this be due to qtquick/kirigami not switching to mobile/touch/tablet mode?  I.e. treating the pen actions as a regular mouse.

Could you perhaps try and start up Kasts with "QT_QUICK_CONTROLS_MOBILE=1 kasts"?  If this works, then it's probably due to that.

As background info: the pages you are refering to, have explicitly set the "text selectable by mouse" on them.  But, for me, it doesn't interfere with touch swiping when in mobile mode.  Unfortunately, I don't have a pen to test with.  (In fact, I don't even know whether a pen in qtquick apps should be considered a mouse or a touch or ...)
Comment 4 Nate Graham 2024-01-30 20:29:49 UTC
This is actually fixed for me now in the SelectableLabel component itself with current git master; before I could reproduce the issue in Discover, and now I can't. I seem to recall Fushan fixing it sometime in the last few months.

If the issue persists in Kasts, I might suggest looking into the implementation code in that app.
Comment 5 Tammes Burghard 2024-01-31 14:45:20 UTC
Yes, It is fixed for me as well. Nice :)