In pretty-printed XML `doc tree', copying selection copies +/- collapsers instead of source (anonymous content, selection, copying)

UNCONFIRMED
Unassigned

Status

()

Core
Serializers
UNCONFIRMED
13 years ago
9 years ago

People

(Reporter: Joe Llywelyn Griffith Blakesley, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041208 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041208 Firefox/1.0+

In a pretty-printed XML `document tree' (when no style information in XML file),
copying a selection copies the plus/minus collapser signs instead of the source
code.

I'd imagine this is related to the fact that the collapsable pretty-printing
uses JavaScript (see bug 264817).

Reproducible: Always
Steps to Reproduce:
1. View an XML file which does not have any style information associated with it
(with JavaScript enabled).
2. Copy a selection (including nested elements) of the displayed pretty-printed
document tree.
3. Paste the selection into a text editor.
Actual Results:  
Before the first plus or minus sign (used for collapsing) encountered in the
selection, the source code is shown normally in the text editor.  After the
first plus or minus sign encountered, ONLY that plus or minus sign and all
subsequent plus or minus signs (delimited by single spaces) are shown in the
text editor; all source code is not copied.

Expected Results:  
The copied text should include ALL of the selected source code (possibly with
some non-stylistic pretty printing by adding spaces) and NONE of the plus and
minus signs.

Running latest official PKzipped nightly build.
(Reporter)

Comment 1

13 years ago
If you look at a narrative-like XML file (which contains more than markup)
<e.g.: http://database.mozdev.org/extensiondescriptions.xml> you will see that
it is copying the non-markup text from the source as well as the +/- selectors.
In this case the DOM doesn't actually have the tagnames in it... 
Summary: In pretty-printed XML `doc tree', copying selection copies +/- collapsers instead of source → In pretty-printed XML `doc tree', copying selection copies +/- collapsers instead of source (anonymous content, selection, copying)
This is actually a bug in the select code, at least the way I interpret it. The
prettyprint sets the -moz-user-select CSS property to 'none' for the +/-, which
I would think should make the text not be copied.
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → EXPIRED
(Reporter)

Comment 6

13 years ago
Only partly WFM in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8) Gecko/20051025 Firefox/1.5 .

The markup as well as the content is now copied :-).  However, the unwanted plus/minus signs are still apparent in the copied text and are all immediately followed by an unwanted new-line character then a horizontal tab.  Only a single tab is used regardless of how deep the following XML element is on the document tree and further lines within that element are not tabulated.

If the text cannot be copied with the tabulation of the pretty-printed original (as expected), it should at least be copied as in the page source view (without any added tabulation or plus/minus signs).
Status: RESOLVED → UNCONFIRMED
Resolution: EXPIRED → ---

Comment 7

10 years ago
Bug is still there in FF3 RC2, xml source is copyied and +/- signs, too.
Assignee: dom-to-text → nobody
QA Contact: dom-to-text
You need to log in before you can comment on or make changes to this bug.