Closed
Bug 232361
Opened 21 years ago
Closed 21 years ago
Can't selected generated content (using ":after" selector)
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
People
(Reporter: bat, Assigned: dbaron)
Details
User-Agent:
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7a) Gecko/20040118
CSS allows the :before and :after pseudo-selectors to specify content that will
appear before or after an element. For example, a rule like
a:before { content: "The website is "; }
would put the words "The website is" (minus the quotes) before every hyperlink
on a page. Naturally our old friend IE doesn't understand this, and Mozilla
does - until you try to select the generated text. Simply put, the text is
unselectable. Given that (a) the text looks exactly like any other, and (b)
there's nothing in CSS to say that some text should be unselectable, this
appears to be a bug.
Reproducible: Always
Steps to Reproduce:
1. Make a stylesheet containing this one rule:
p.bug:after { content: " please"; }
2. And a page containing this HTML fragment:
<p>Select from here</p>
<p class="bug">through here</p>
<p>to here</p>
3. Either <link> to the stylesheet or (easier) just include the rule in <style>
tags.
Actual Results:
Three paragraph display:
Select from here
through here please
to here
(This is correct. The "please" was added for us by the rule.)
However, when you try to select the text, either using rightclick | Select All
or just dragging with the mouse, the word "please" doesn't get selected.
Expected Results:
The generated content ("please") should be selectable.
This was pointed out by Vinnie Garcia on
<http://blog.vinniegarcia.com/oldstuff/000070.html>
I haven't tested with :before, or with content in other rules. Someone should.
Assignee | ||
Comment 1•21 years ago
|
||
*** This bug has been marked as a duplicate of 12460 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•