Contenteditable: Undesirable transformations on copy/paste
Reported by
aaron.na...@pearson.com,
Oct 10 2016
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 Steps to reproduce the problem: 1. In a blank contenteditable, enter a blank line followed by a line with some text (ex "123456789") 2. Select All and copy 3. Paste twice and review HTML generated. What is the expected behavior? Before you copy/paste. the HTML will look like this: <div><br></div><div>123456789</div> After copying pasting twice on windows you would expect to get this: <div><br></div><div>123456789</div><div><br></div><div>123456789</div> What went wrong? On Windows you end up with this: <br><div>123456789<br></div><div><br></div>123456789 Notice the first BR has been unwrapped as well as the last text element. On Mac you end up with this: <br class="Apple-interchange-newline">123456789<br class="Apple-interchange-newline">123456789<br> Notice the DIVs have been stripped altogether. HTML generated from paste operation should be predictable. Sample file used is attached. Did this work before? N/A Chrome version: 53.0.2785.143 Channel: stable OS Version: OS X 10.11.5 Flash Version: Shockwave Flash 23.0 r0 As noted this happens on Mac and Windows. I've tried it Canary on Windows and Mac the the results are the same in 53 and 56.0.2886.0 on each platform
,
Oct 12 2016
Able to reproduce this issue on Windows-10 and Mac 10.12 using chrome latest stable M53-53.0.2785.143 and earlier version of chrome M30-30.0.1549.0. Observed the same html pattern in both versions in both OS platforms. Please check the screenshot taken in M30-30.0.1549.0 which was taken in windows. This is a non-regression issue and marking it as untriaged.
,
Oct 18 2016
Clipboard contains following HTML after Copy: <html> <body> <br class="Apple-interchange-newline"> <span style="color: rgb(0, 0, 0); font-family: Meiryo; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;">123456789</span> </body> </html> This is pasting behavior.
,
Feb 16 2017
Issue 685839 has been merged into this issue.
,
Feb 16 2017
Duped bug has more examples.
,
Oct 4 2017
,
Aug 8
Hello, any update on this? |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by rsesek@chromium.org
, Oct 11 2016Labels: OS-Windows