Bug 303780 - Selecting text in some dialogue boxes copies the from wrong place in dialogue
Summary: Selecting text in some dialogue boxes copies the from wrong place in dialogue
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdeui (show other bugs)
Version: 4.8.90 (beta2)
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-19 09:12 UTC by Nick Leverton
Modified: 2012-07-21 12:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.9.0


Attachments
Example of highlighting whole line (38.85 KB, image/png)
2012-07-19 09:12 UTC, Nick Leverton
Details
Example of highlighting part of the dialogue (33.08 KB, image/png)
2012-07-19 09:13 UTC, Nick Leverton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Leverton 2012-07-19 09:12:14 UTC
I think one of the very major strengths of KDE+Linux compared to rival operating systems is that I can select and copy text, such as download filenames or messages, from dialogue boxes.

However in 4.9 beta2 this sometimes copies from the wrong place in the dialogue.  I am seeing this happen when the underlying dialogue seems to be HTML.  I think the issue is that the select/copy is not aware of the HTML markup

I think it's really great that the selection in this case does get the un-elided text, prior to the HTML rendering, it's just a shame that it doesn't quite get it right.

Reproducible: Always

Steps to Reproduce:
1. Visit http://www.microsoft.com/en-us/download/details.aspx?id=3 (this is the download link for Microsoft Office Compatibility Pack) and click through to start the download
2.  A dialogue should appear, assuming you haven't already configured .exe files to be just downloaded instead of asked about
3.  Highlight the text on the dialogue and compare with the contents of the selection or clipboard as shown in Klipper.
Actual Results:  
Higlighting first line from Open to the end (see first attachment) results in 

<html>Open 'http://download.microsoft.com/download/9/2/2/9222D67F-7630-4F49-BD26-476B51517FC1/FileFormatConverters

Highlighting URL only within the single-quotes (see second attachment) results in

Open 'http://download.microsoft.com/download/9/2/2/9222D67F-7630-4F49-BD26-476B51517FC1/FileFormatConverte

Expected Results:  
The text on the clipboard should match what is highlighted (though it's really great if it can expand the parts that are suppresed due to space)
Comment 1 Nick Leverton 2012-07-19 09:12:59 UTC
Created attachment 72618 [details]
Example of highlighting whole line
Comment 2 Nick Leverton 2012-07-19 09:13:41 UTC
Created attachment 72619 [details]
Example of highlighting part of the dialogue
Comment 3 Nick Leverton 2012-07-19 10:16:46 UTC
My apologies for my appalling spelling there !
Comment 4 Christoph Feck 2012-07-21 12:31:09 UTC
Git commit 013376e9a962984e42233a9460d52792d39d05cd by Christoph Feck.
Committed on 21/07/2012 at 14:27.
Pushed by cfeck into branch 'KDE/4.9'.

Account for markup in KSqueezedLabel selection

REVIEW: 105620
FIXED-IN: 4.9.0

M  +11   -2    kdeui/widgets/ksqueezedtextlabel.cpp

http://commits.kde.org/kdelibs/013376e9a962984e42233a9460d52792d39d05cd