Closed Bug 764862 Opened 12 years ago Closed 12 years ago

Select all | Copy, on the about: page (xhtml), does not paste correctly

Categories

(SeaMonkey :: UI Design, defect)

defect
Not set
trivial

Tracking

(seamonkey2.12 fixed, seamonkey2.13 verified)

VERIFIED FIXED
seamonkey2.13
Tracking Status
seamonkey2.12 --- fixed
seamonkey2.13 --- verified

People

(Reporter: therubex, Assigned: ewong)

Details

(Keywords: regression)

Attachments

(1 file, 3 obsolete files)

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120613 Firefox/15.0a2 SeaMonkey/2.12a2
Build ID: 20120613013002

Steps to reproduce:

 
Open about:
Ctrl+A to select all
Ctrl+C to copy
 


Actual results:

 
When pasted, the layout is not formatted as expected
 


Expected results:

 
Pasted output should be laid out correctly

It's basically OK, except that the fields /User agent:/ & /Build identifier:/ run together, could stand a \n
 
 
This came about from Bug 752797 - Build ID absent from about: page
And relates in general to Bug 319141 - Copy from XHTML content always copies only plain text instead of formatted content (HTML or RTF)
Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/16.0 Firefox/16.0a1 SeaMonkey/2.13a1 ID:20120614022149

I can reproduce the problem.

See http://mxr.mozilla.org/comm-central/source/suite/common/about.xhtml

Unlike the preceding lines, which are present in the form <li>...</li> in the XHTML source, the "User Agent" and "Build ID" lines are added by Javascript.

ewong: Would it make a difference if </script> then <script type=application/javascript> were added (on two different lines) between the block "if (ua) {...}" and the line "var buildID = ..." i.e. near current line 74?
Status: UNCONFIRMED → NEW
Component: General → UI Design
Ever confirmed: true
QA Contact: general → ui-design
Version: SeaMonkey 2.10 Branch → Trunk
Severity: normal → trivial
OS: Windows XP → All
Hardware: x86 → All
Assignee: nobody → ewong
Status: NEW → ASSIGNED
This patch is actually a workaround while bug #319141 is still open.
Attachment #633388 - Flags: review?(neil)
I think you should add a comment in the patch regarding bug 319141
> +        listItem.appendChild(document.createTextNode("\n    "));
Comment on attachment 633388 [details] [diff] [review]
Add crlf+"    " so the paste is correct. (v1)

>       // append user agent
>       var ua = navigator.userAgent;
>       if (ua) {
>         var list = document.getElementById("aboutPageList");
>         var listItem = list.appendChild(document.createElement("li"));
>         listItem.appendChild(document.createTextNode("&about.userAgent;"));
>         listItem.appendChild(document.createTextNode(ua));
>+        listItem.appendChild(document.createTextNode("\n    "));
Please can you append this text node to the list, rather than the item.
Can you also do it for the build ID for consistency?
Don't forget Ratty's comment of course.

>         var list = document.getElementById("aboutPageList");
>         var listItem = list.appendChild(document.createElement("li"));
Oops, duplicate variable declarations. We'll have to use let instead.
Attachment #633388 - Flags: ui-review+
Attachment #633388 - Flags: review?(neil)
Attachment #633388 - Flags: review-
Attachment #633388 - Attachment is obsolete: true
Attachment #633760 - Flags: review?(neil)
Comment on attachment 633760 [details] [diff] [review]
Add crlf+" " so the paste is correct. (v2)

[The blank lines were slightly different in the two places; they should look the same.]

>+      // append "\n    " to the aboutPageList children as a workaround
>+      // for bug 319141.
>+      list.appendChild(document.createTextNode("\n    "));
Please put this inside the if block [both times]. r=me with that fixed.
Attachment #633760 - Flags: review?(neil) → review+
Attachment #633760 - Attachment is obsolete: true
Attachment #633861 - Flags: review+
Pushed to comm-central:
http://hg.mozilla.org/comm-central/rev/1347d4a8e05e
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
    User agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/16.0 Firefox/16.0a1 SeaMonkey/2.13a1
    Build identifier: 20120617112337

In the clipboard copy, "User agent" and Build identifier" now appear on separate lines (as seen above), immediately after the other list items, the last one of which links to about:buildconfig.

=> VERIFIED for 2.13a1 Trunk.

2.12a2 Aurora is still affected.
Status: RESOLVED → VERIFIED
Target Milestone: --- → seamonkey2.13
Comment on attachment 633861 [details] [diff] [review]
Add crlf+" " so the paste is correct. (v3)

[Approval Request Comment]
Regression caused by (bug #): 
User impact if declined: 
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky):
String changes made by this patch:
Attachment #633861 - Flags: approval-comm-beta?
Attachment #633861 - Flags: approval-comm-aurora?
[Approval Request Comment]
Regression caused by (bug #): 764862
User impact if declined: Minor/trivial
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky):
String changes made by this patch: None

(Once again, forgot to fill these in.)
Attachment #633861 - Flags: approval-comm-beta?
Attachment #633861 - Flags: approval-comm-beta+
Attachment #633861 - Flags: approval-comm-aurora?
Attachment #633861 - Flags: approval-comm-aurora+
...this failed to apply for beta, care to adjust patch and land yourself?
(In reply to Tony Mechelynck from comment #9)
> 2.12a2 Aurora is still affected.
So presumably 2.11 doesn't have bug 752797 so there's nothing to do there?
Comment on attachment 639245 [details] [diff] [review]
Select all | Copy, on the about: page (xhtml), does not paste correctly (for comm-beta)

Did not need to patch comm-beta, so there's no need to push to comm-beta.
Removing review and other flags to this patch.
Attachment #639245 - Attachment is obsolete: true
Attachment #639245 - Flags: review?(neil)
Attachment #633861 - Flags: approval-comm-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: