Bug 290485

Summary: text selection lags behind the mouse position
Product: [Applications] konqueror Reporter: Martin Koller <kollix>
Component: khtmlAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: kde
Priority: NOR    
Version: 4.8.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=307824
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Martin Koller 2012-01-03 11:45:16 UTC
Version:           0.0.1 (using Devel) 
OS:                Linux

Since 4.8 I have the following problem:
The text selection does not correctly start below my mouse cursor.
E.g. when starting to select the text "-graphicssystem native"
and the mouse is over/at the left end of the - character, the selection starts
with the character " left of it, and when I move the mouse to the right, the
selection itself lags behind the mouse position. E.g. when I'm already with the
mouse over the ending " the selection only is done until "-graphicssystem nativ


This was detected while checking bug 290371
There you can read the response from Christoph Feck:

This is because Qt 4.8 now defaults to subpixel precision when layouting text
positions. Konqueror has to make sure it computes the same widths for
layouting/selecting as Qt uses for rendering, or alternatively force integer
font metrics (which would make it look worse, but work correctly).

Reproducible: Always

Steps to Reproduce:
see above

Actual Results:  
wrong selection

Expected Results:  
Select exactly the text which is under the mouse, as was done in all previous KDE versions.
Comment 1 Christoph Cullmann 2024-05-06 18:39:40 UTC
Dear user,

KHTML (and KJS) was a long time more or less unmaintained and got removed in KF6.

Please migrate to use a QWebEngine based HTML component.

We will do no further fixes or improvements to the KF5 branches of these components beside important security fixes.

For security issues, please see:

https://kde.org/info/security/

Sorry that we did not fix this issue during the life-time of KHTML.

Greetings
Christoph Cullmann