Closed Bug 507679 Opened 15 years ago Closed 15 years ago

Find and Copy finds/copies hidden text (style="display:none") [should not copy invisible text]

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 39098

People

(Reporter: thomas8, Unassigned)

References

()

Details

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090731 Minefield/3.6a1pre

Unexpected behaviour, discovered on Firefox Keyboard shortcuts page (see URL).
Text with style="display:none" is correctly hidden, but both inline "Find" (Ctrl+F) and "Copy" command act as if the text was still visible. Find acts unpredictable.

Steps to reproduce (copy)

1.) HTML page with some text having style="display:none" (see URL)

<span class="noMac kbd">Ctrl</span>
<span style="display: none;" class="mac kbd">Cmd</span>+
<span style="text-align: left; float: none; clear: none;" class="kbd">B</span>

2.) Select visible and non-visible text (e.g. "Ctrl+B" text of the above URL)
3.) Copy selection (context menu, copy)
4.) Paste selection

Actual results (copy)
- invisible text is pasted together with visible text
(e.g. "CtrlCmd+B" is the result of pasting)

Expected results
- invisible text should not be copied. copy should be wysiwyg


Steps (find)

1.) press Ctrl+F, enter search term "Ctrl+B", press Enter
alternatively
2.) enter search term "CtrlCmd"
3.) or "CtrlCmd+B"

Actual result (find)

1.) "Ctrl+B" not found (but that's what's rendered on the page!)
2.) "CtrlCmd" not found (now watch the result of 3:)
3.) "CtrlCmd+B" IS found (in spite of 2.!) (though it doesn't show on the page)

Expected result (find)
Only "Ctrl+B" as rendered on the page should be found as displayed on the page! I can't search for hidden characters! Also, find should act consistently. How come CtrlCmd is not found, but CtrlCmd+B is? Unpredictable.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
The second problem described in this bug report is bug 305381

Please next time if possible file each bug in different report.
You need to log in before you can comment on or make changes to this bug.