Closed Bug 397918 Opened 17 years ago Closed 17 years ago

Copying text copies html elements with CSS style set to "display: none"

Categories

(Firefox :: General, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 39098

People

(Reporter: nicsterr, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a7) Gecko/2007081820 GranParadiso/3.0a7
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a7) Gecko/2007081820 GranParadiso/3.0a7

Copying text from the browser window should copy only displayed text (Opera and Konqueror behave in this way). Firefox copies to the clipboard the text of all elements, displayed or not.


Reproducible: Always

Steps to Reproduce:
The following html shows the problem:

<body>
	<p>This text is displayed.</p>
	<p style="display: none">*This text is not displayed.*</p>
	<p>This last text is also displayed.</p>
</body>

Firefox displays the following:
    This text is displayed.
    This last text is also displayed.

Actual Results:  
When the text is copied, the clipboard contains the following:
    This text is displayed.
    *This text is not displayed.*
    This last text is also displayed.


Expected Results:  
This text is displayed.
This last text is also displayed.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.