When printing only "Selection", if selection started at the beginning of a text line which happens to have white-space in the source before it, text line gets a spurious "..." (…) ellipsization prefix
Categories
(Core :: Printing: Output, defect)
Tracking
()
People
(Reporter: nekohayo, Unassigned, Mentored)
Details
(Keywords: good-first-bug)
Attachments
(2 files)
See attached demonstration video.
Steps to reproduce
- Go to an article such as https://www.health.harvard.edu/pain/is-your-pillow-hurting-your-health
- Select from the beginning of the first header (title) line, "Is your pillow hurting your health?" and downwards
Ctrl+P
- Select "Selection" instead of "Original"
Actual results
Notice the resulting document's first line being prefixed with …, so it reads "...Is your pillow hurting your health?"
Expected results
No "..." prefix.
Workaround
If you start your selection on the line before, i.e. including the invisible paragraph/line break, then the heading in the resulting document does not get prefixed with "...".
This was tested with Firefox 136.0 (from Fedora 41's repositories) on Linux, but it has also affected every previous Firefox version I used.
Comment 1•5 days ago
|
||
Huh, interestingly, it doesn't happen with right click -> Print selection...
Comment 2•5 days ago
|
||
Huh, nvm, it does, if you just mouse drag. If you triple-click the header and drag down it doesn't. This is probably the white-space in the header confusing us.
It seems we should just check whether any character in the text node that starts the selection is non-whitespace here. Should be a relatively easy fix?
Comment 3•4 days ago
|
||
Reduced test-case would be:
data:text/html,<h1> foo </h1><h1>Bar</h1>
Comment 4•2 days ago
|
||
Updated•2 days ago
|
Comment 5•2 days ago
|
||
Description
•