Copying the title in YouTube the paste contains leading and trailing space
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect)
Tracking
()
People
(Reporter: pmenzel+bugzilla.mozilla.org, Unassigned)
Details
Attachments
(1 file)
|
41.92 KB,
text/plain
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0
Steps to reproduce:
Three time click on a title of YouTube, copy it and paste it. The HTML is
<yt-formatted-string force-default-style="" class="style-scope ytd-watch-metadata">TITLE</yt-formatted-string>
Actual results:
The paste contains a leading and trailing space.
Expected results:
No spaces should be included in the paste.
Selecting the title with the cursor from start to end, no spaces are included.
| Reporter | ||
Comment 1•3 years ago
|
||
Comment 2•3 years ago
|
||
I'm having difficulties understanding what are you referring to "title of Youtube". Is it the title from inspecting the page or the title of a video?
If you could provide a screenshot with what exactly are you copying would be great to understand the bug easier.
Thanks.
| Reporter | ||
Comment 3•3 years ago
|
||
I mean the title below the video.
Comment 4•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 5•3 years ago
|
||
I think it depends on the page which posts to clipboard. Can you try different browser if you get the same result?
Thanks.
| Reporter | ||
Comment 6•3 years ago
|
||
For example, go to https://www.youtube.com/watch?v=bXBvyt2qR20 and double click on the title.
In Nightly spaces are around the string, when pasting it. In chromium 110.0.5481.77-2, these spaces are not there.
Comment 7•3 years ago
|
||
Hm, we're getting the spaces from GetTransferData("text/plain",...) so looks like bug in html conversion.
Updated•3 years ago
|
Comment 9•3 years ago
|
||
Maybe I'm doing something wrong, but I can't reproduce. I've tried current Nightly (112.0a1 2023-02-22) both on MacOS13 and Ubuntu 22.04.
I've selected the title by clicking on it 3 times, then copied via Cmd/Ctrl+C.
When pasting, I get this:
Firefox: state and future of the project [Martin Stransky]
Without spaces at the beginning or the end.
Could you check the latest version of Nightly? Or am I missing something?
| Reporter | ||
Comment 10•3 years ago
|
||
I am still able to reproduce this with Debian sid/unstable, gnome-shell 43.3-1 and Nightly 112.0a1, 20230222094403.
| Reporter | ||
Comment 11•1 year ago
|
||
I am still able to reproduce this with Debian sid/unstable, gnome-shell 44.9-1 and Nightly 125.0a1, 20240311211339.
Some when tripple clicking on KeyTrap! in the article KeyTrap! by Geoff Huston. The HTML is:
<p><FONT COLOR="#CC6633" SIZE="+2" FACE="Verdana,Times,Times New Roman">
<b>
<!-- InstanceBeginEditable name="title" -->KeyTrap!<!-- InstanceEndEditable -->
</b>
</FONT>
Just double clicking, so only KeyTrap without the exclamation mark is selected, pasting that selection there is a leading space but no trailing one.
Do line breaks play a role here?
Description
•