New issue
Advanced search Search tips

Issue 877908 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Coping all in "white-space: pre" element generates an extra character.

Reported by bozo...@gmail.com, Aug 27

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

Example URL:
https://jsfiddle.net/sztv24o5/

Steps to reproduce the problem:
I've isolated a minimal repro for the bug at https://jsfiddle.net/sztv24o5/

The following conditions are sufficient for the bug to be reproduced:
1. A floating element containing a single non-word character
2. Followed by an white-space:pre element containing the text to be selected

Upon selecting the text in (2), the first character of the selected text will be appended to the end of the selection. E.g. 'abcdef' -> 'abcdefa'.

This occurs on both double-click selection, right-click selection triggering context menu, and long-press on mobile (Android) Chrome builds.

What is the expected behavior?
Text being selected should not have trailing junk attached to the end.

What went wrong?
Under the conditions identified in repro steps, the selected text will have an extra character appended to the end (the first character of the selected text will be appended).

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: 68.0.3440.106  Channel: stable
OS Version: OS X 10.13.6
Flash Version:
 
repro.mov
1.7 MB View Download
Labels: Needs-Triage-M68
Components: -Blink UI>Browser>Contextual Blink>Editing>Selection
Cc: vamshi.kommuri@chromium.org
Labels: Needs-Feedback Triaged-ET
Status: Untriaged (was: Unconfirmed)
Thanks for filing the issue!

Able to reproduce the issue on reported chrome version 68.0.3440.106 using Mac 10.13.1, hence marking it as Untriaged.

@Reporter: As the issue seems to be fixed in latest beta 69.0.3497.57, Could you please check the same on this version and let us know the behaviour. Please find the below URL to download/install the latest chrome versions.
https://www.chromium.org/getting-involved/dev-channel

Components: -UI>Browser>Contextual
Owner: yoichio@chromium.org
Status: Assigned (was: Untriaged)
It seems we should paint line break for "float".

https://jsfiddle.net/sztv24o5/4/
Summary: Coping all in "white-space: pre" element generates an extra character. (was: Junk trailing character appearing in selected text)
No, this is not about line-end painting.
It's about plaintext:
https://jsfiddle.net/a1up5hfj/

I guess emitting next characters is broken.
Labels: Needs-Bisect
Owner: ----
Status: (was: Assigned)
I don't know if this is regression.
Components: -Blink>Editing>Selection Blink>Editing>Serialization
This bug had an unsupported status. Updating to Untriaged so someone will reevaluate.
Status: Untriaged

Sign in to add a comment