Selection and copy of text adds a space to beginning of selection
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox93 | --- | affected |
People
(Reporter: ryanlantzy, Unassigned)
Details
Attachments
(1 file)
165 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
Steps to reproduce:
-
Load an website or HTML file with text content in the body tag that has two spaces between two text elements. E.g. "FirstTextElement SecondTextElement"
-
Double click on the second text element
-
Right click copy (or Ctrl+C on Windows)
-
Paste the selection to a text editor
Actual results:
The second text element is selected visually, with no leading space. However when the selection is pasted elsewhere, a leading space is carried with it.
Expected results:
The actual copied selection should match the visual text selection with no space.
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Thanks for reporting this bug. AFAICT, there is no specification to address this behavior, we should consider put into specification make it align with all browsers.
Test result:
Mozilla/Nightly 69.0a1 (Window 10 x64), it has a leading space after pasted to a text editor. ex: " SecondTextElement".
Edge/17.17134 (Window 10 x64), it has a tail space after pasted to a text editor. ex: "SecondTextElement ".
Chrome/75.0.3770.100 (Window 10 x64) and Safari/537.36 (Window 10 x64) match the visual text selection with no space.
Hi :masayuki,
Could you help to take a look? Thank you.
Comment 2•6 years ago
|
||
Hmm, doubleclick causes selecting start from second space of previous word. I don't think this should be standardized but this behavior is odd.
Comment 3•6 years ago
|
||
Note when having three (instead of two) whitespaces in the html file, also only one additional whitespace is copied.
Updated•3 years ago
|
Updated•2 years ago
|
Description
•