New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 605651 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Trailing spaces near inline tags for text being lost on copy at widths where text wraps

Reported by semi...@theseminal.com, Apr 21 2016

Issue description

Chrome Version       : 49.0.2623.112 (OSX)

URLs (if applicable) : http://www.huffingtonpost.com/2016/04/20/huffpost-hill_n_9742432.html?utm_hp_ref=huffpost-hill

9th paragraph

Other browsers tested:
  Firefox (latest): OK
  Safari (latest): OK

What steps will reproduce the problem?
(1) Create a blank HTML document with the following HTML:

<!DOCTYPE html>
<html>
<head></head>
<body>
<p style="width: 550px;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor <a href="http://google.com">incididunt ut</a> labore et dolore magna aliqua.</p>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor <a href="http://google.com">incididunt ut</a> labore et dolore magna aliqua.</p>

<div contenteditable="true" style="border: 1px solid black;">
</div>
</body>
</html>

(2) Save the file, open it in Chrome.

(3) Highlight and copy the first paragraph, paste it into the contenteditable div below. 


What is the expected result?

The text is pasted accurately.


What happens instead?

The space between the word before the a tag (tempor) and the word in the a tag (incididunt) is removed.

If you copy the next paragraph, which is the same exact HTML but without the width style on the p tag causing a wrap where the link is, you get the correct output, with space preserved.


Please provide any additional information below. Attach a screenshot if
possible.

Here's the result I get when copying the first paragraph:

https://www.evernote.com/l/AD8m4UsFUp1ENK_cc-Vg_xfTnBBdEHT4sJ0

And the result from the second:

https://www.evernote.com/l/AD9L2jdyWCFEvrIuoPFoQiAhIrAIG4i_R1g

Note that this seems to be an issue on copy, not on paste (or with contenteditable). If I copy this text in Chrome and paste into a working browser like Firefox, the space is missing. If I copy in Firefox and then paste into Chrome, the space is there.

So it seems, if the width of the paragraph is such that a tags wrap when viewed, if you copy that text Chrome removes a space where it shouldn't between the tag around the line wrap. If there's no line wrapping, the space is preserved.
 
Adding that this is causing issues with WYSIWYG editors, which is the use case I'm concerned about.

Comment 2 Deleted

Cc: ranjitkan@chromium.org
Components: Blink>HTML
Labels: M-52 OS-All
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on 50.0.2661.87 and is a non regression issue seen from M24 builds - 24.0.1300.0. Issue appears on all OS win 7, MAC 10.11.4, Ubuntu 14.04. Untriaging it so that t gets addressed.
Components: -Blink>HTML Blink>Editing
Owner: yosin@chromium.org
I can reproduce this on Linux/50.0.2661.86 (Official Build) (64-bit).

Here's the repro content in a file to save you some time.
cr605651.html
481 bytes View Download

Comment 5 by yosin@chromium.org, Apr 26 2016

Components: -Blink>Editing Blink>Editing>Command
Status: Available (was: Untriaged)
Project Member

Comment 6 by sheriffbot@chromium.org, Jun 1 2016

Labels: -M-52 M-53 MovedFrom-52
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 7 by sheriffbot@chromium.org, Jul 12 2016

Labels: -M-53 MovedFrom-53
This issue has been moved once and is lower than Pri-1. Removing the milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 8 by yosin@chromium.org, Dec 2 2016

Owner: ----
Project Member

Comment 9 by sheriffbot@chromium.org, Dec 11 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)
Project Member

Comment 11 by sheriffbot@chromium.org, Jan 10

Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment