You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I select text in a ::before or ::after pseudo-element and then copy my selection with Ctrl+C, the text is not included in the clipboard.
This is very unintuitive.
Note:
Selecting the text in these pseudos is generally quite tricky, but Ctrl+A does it reliably for any pseudos that aren't on the root element.
With more complicated layouts, I can also get it to happen by starting drags inside the padding areas of elements with pseudos.
The spec for user-select says that the UA may apply it to pseudo elements.
In such a case, they are user-select: none by default, but can be changed to other values.
Since we currently only support a single range per selection, we are allowed (but not forced) to select them, even in the user-select: none case if our single range starts before and ends after the pseudo element.
Overall: The visible selection should match what gets copied to the clipboard, one way or another.
Operating system
Linux
Steps to reproduce
Open the reduced test case.
Use Ctrl+A to select all the text.
The word 'hello' is now selected.
Press Ctrl+C to copy all the text.
Paste it somewhere and notice the missing word.
Expected behavior
The word 'hello' should be included in the copy.
Actual behavior
The word 'hello' is not included in the copy.
URL for a reduced test case
N/A
HTML/SVG/etc. source for a reduced test case
<!DOCTYPE html><style>span::before {
content:"hello";
}
</style>
Well <span> friends!</span>
Log output and (if possible) backtrace
None
Screenshots or screen recordings
Build flags or config settings
None
Contribute a patch?
I’ll contribute a patch for this myself.
The text was updated successfully, but these errors were encountered:
Summary
When I select text in a ::before or ::after pseudo-element and then copy my selection with Ctrl+C, the text is not included in the clipboard.
This is very unintuitive.
Note:
Selecting the text in these pseudos is generally quite tricky, but Ctrl+A does it reliably for any pseudos that aren't on the root element.
With more complicated layouts, I can also get it to happen by starting drags inside the padding areas of elements with pseudos.
The spec for user-select says that the UA may apply it to pseudo elements.
In such a case, they are
user-select: none
by default, but can be changed to other values.Since we currently only support a single range per selection, we are allowed (but not forced) to select them, even in the
user-select: none
case if our single range starts before and ends after the pseudo element.Overall: The visible selection should match what gets copied to the clipboard, one way or another.
Operating system
Linux
Steps to reproduce
Expected behavior
The word 'hello' should be included in the copy.
Actual behavior
The word 'hello' is not included in the copy.
URL for a reduced test case
N/A
HTML/SVG/etc. source for a reduced test case
Log output and (if possible) backtrace
Screenshots or screen recordings
Build flags or config settings
None
Contribute a patch?
The text was updated successfully, but these errors were encountered: