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

Issue 776033 link

Starred by 3 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: 2017-11-01
OS: Linux , Windows , Mac
Pri: 3
Type: Bug-Regression



Sign in to add a comment

A html comment at the end of the text will affect copy&paste result

Reported by yehchih...@gmail.com, Oct 18 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Safari/604.1.38

Example URL:

Steps to reproduce the problem:
1. make a webpage like this:

<div>
  <p>
    line 1
    <!-- useless comment !-->
  </p>
  <p>line 2</p>
  <p>line 3</p>
</div>

2. open Chrome. Copy the content from the page
3. paste it into a plain-text editor

What is the expected behavior?
All three lines should have an empty line in between.

What went wrong?
Notice that between line 1 and line 2 there's no empty line. If there's no html comment like line 2,  then it works just fine.

One would expect html comment does not change the result of copy & paste, but in fact it does.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: Version 61.0.3163.100 (Official Build) (64-bit)  Channel: stable
OS Version: OS X 10.13
Flash Version: Shockwave Flash 27.0 r0
 
a.html
101 bytes View Download
Labels: Needs-Triage-M62
Cc: divya.pa...@techmahindra.com
Components: Blink>DataTransfer
Labels: Needs-Feedback Triaged-ET
Unable to reproduce the issue on reported version 61.0.3163.100 and latest canary 64.0.3243.0 using Mac 10.12.6

@ yehchihwei: Could you please re-try the scenario by creating a new profile 

Please follow below steps to create a New profile
(i). Launch chrome>>Press Alt+E>>Settings)
(ii).Under the section headed People, Click on link Manage other people>>Add person

If the issue still persists, please let us know your observation and provide the screenshot, that would help in triaging the issue from TE-end

776033.png
25.7 KB View Download
Hi Divya,

I made a new profile, but the issue can still be reproduced, so do my friends.
The plain text editor can be just a vim or something that's very simple.

I am attaching a gif to show what's going on.

Thanks,
Chihwei
Project Member

Comment 5 by sheriffbot@chromium.org, Oct 20 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "divya.padigela@techmahindra.com" to the cc list and removing "Needs-Feedback" label.

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

x4lOJqXtEh.gif
192 KB View Download

Comment 7 by jsb...@chromium.org, Oct 20 2017

Components: -Blink>DataTransfer -Blink Blink>Editing>Serialization
Labels: OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on reported version 61.0.3163.100, latest stable 62.0.3202.62 and latest canary 64.0.3247.0 using mac 10.12.6, Ubuntu 14.04 and win 10

Below is the Manual bisect info
Good : 61.0.3145.0   - 483574
Bad:  61.0.3146.0    - 483866

working on tool bisect, will update the result soon
Cc: r...@opera.com
Labels: -Type-Bug -Pri-2 hasbisect-per-revision M-64 Pri-1 Type-Bug-Regression
Owner: yosin@chromium.org
Status: Assigned (was: Untriaged)
Here is the Tool Bisect Info:
---------------------------
You are probably looking for a change made after 483682 (known good), but no later than 483683 (first known bad)

CHANGELOG URL:
https://chromium.googlesource.com/chromium/src/+log/203a2bad8062d170441af80f574e897bc586f180..7c44da721a59e6aa0b9fdcddb314175cb1e0123f

Possible suspect:
---------------
https://chromium-review.googlesource.com/517940

@Rune Lillesveen: Kindly take a look and please help us in reassign this issue to a right owner if not with respect to your change.

Note: Unable to assign to Rune Lillesveen, hence assigning to 
Yoshifumi Inoue as one of the reviewers of the CL

Thanks.!

Comment 10 by yosin@chromium.org, Oct 24 2017

NextAction: 2017-11-01
Since we can't reach rune@opera.com, yosin@ is a temporary owner.
The NextAction date has arrived: 2017-11-01
Owner: futhark@chromium.org
futhark@, could you take look?
It seems you change affect visible selection canaonicalization.
Cc: -r...@opera.com
Owner: yosin@chromium.org
So:

Fails:

(a) <p>line 1 <!-- useless comment !--> </p>
(b) <p>line 1<!-- useless comment !--></p>
(c) <p>line 1 <!-- useless comment !--></p>

Works:

(d) <p>line 1<!-- useless comment !--> </p>
(e) <p>line 1</p>


The new fail here is (a). The reason is that my CL optimized away the LayoutText for the whitespace node because it's looking at the previous text node to see if it ends with a whitespace and concludes it doesn't need a whitespace renderer. It's just triggering the same issue as (b) and (c) afaict.

The bug is that the code somehow incorrectly requires a LayoutText after the comment to be able to serialize correctly.

Cc: futhark@chromium.org

Comment 16 by yosin@chromium.org, Jan 10 2018

Labels: -Pri-1 Pri-3
Owner: ----
Status: Available (was: Assigned)
Lower to Pri-3 since we don't have enough resources to work this.
This is caused by visible canonicalization and we need to have many changes to
fix this issue.
Project Member

Comment 17 by sheriffbot@chromium.org, Jan 10

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.

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

Sign in to add a comment