Open Bug 1800138 Opened 3 years ago Updated 1 year ago

Copying the title in YouTube the paste contains leading and trailing space

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect)

Firefox 108
defect

Tracking

()

UNCONFIRMED

People

(Reporter: pmenzel+bugzilla.mozilla.org, Unassigned)

Details

Attachments

(1 file)

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.

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.

Flags: needinfo?(pmenzel+bugzilla.mozilla.org)

I mean the title below the video.

Flags: needinfo?(pmenzel+bugzilla.mozilla.org)

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.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

I think it depends on the page which posts to clipboard. Can you try different browser if you get the same result?
Thanks.

Flags: needinfo?(pmenzel+bugzilla.mozilla.org)

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.

Flags: needinfo?(pmenzel+bugzilla.mozilla.org)

Hm, we're getting the spaces from GetTransferData("text/plain",...) so looks like bug in html conversion.

Component: Widget: Gtk → DOM: Copy & Paste and Drag & Drop

Hi Jan, mind taking a closer look at this?

Flags: needinfo?(jjaschke)
Severity: -- → S3

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?

Flags: needinfo?(jjaschke) → needinfo?(pmenzel+bugzilla.mozilla.org)

I am still able to reproduce this with Debian sid/unstable, gnome-shell 43.3-1 and Nightly 112.0a1, 20230222094403.

Flags: needinfo?(pmenzel+bugzilla.mozilla.org)

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?

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: