contenteditable: copy&paste wraps word into <span> if relative font size is used
Reported by
ukrav...@digitalocean.com,
Sep 14 2017
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36 Steps to reproduce the problem: 1. Insert <style> within a page to create a CSS grid 2. Edit Grid Properties 3. What is the expected behavior? The grid would change accordingly What went wrong? The grid broke. See video here: https://twitter.com/Una/status/908455137722732545 (example shows Firefox on the left and Chrome on the right) Demo is here: https://codepen.io/una/full/3c45ff838c002255c1b04d63d422466e (10th box on the right will bring you into it) Did this work before? No Does this work in other browsers? Yes Chrome version: 60.0.3112.113 Channel: n/a OS Version: OS X 10.11.4 Flash Version:
,
Sep 15 2017
I can reproduce the issue in your codepen. But I've tried to reproduce the issue in an isolated example without success: http://jsbin.com/fisuto/edit?html,css,output The problem I see is that when I edit the CSS to change the grid-template, the grid container doesn't have that property. I've been using the DevTools to inspect the grid container, initially it has: .grid-area { display: grid; grid-template: "😄 😄 😄 😄" 50px "↕️ 🖼 🖼 🖼" 400px "↕️ 🍅 🍅 🍅" auto "👟 👟 👟 👟" 80px / 10% 30% 30% 30%; } But after the modifications it has: .grid-area { display: grid; } So if the "grid-template" property is not applied, it's somehow expected that it doesn't work. Now the question would be to know why that property is not applied after the modification. Could you provide a reduced test case? Thanks!
,
Sep 15 2017
Able to reproduce the issue on Windows 10, Ubuntu 14.04 and Mac 10.12.6 using chrome stable version #61.0.3163.91 and latest canary #63.0.3215.0. Bisect Information: ===================== Good build: 57.0.2928.0 Revision(433845) Bad Build : 57.0.2929.0 Revision(434071) Change Log URL: https://chromium.googlesource.com/chromium/src/+log/c11607a50691c6da823467bb389d14f659433c77..79bd413143afe5ad68104a3c99b9c04f64fc25ac From the above change log suspecting below change Review URL: https://codereview.chromium.org/2521953002 rego@ - Could you please check whether this is caused with respect to your change, if not please help us in assigning it to the right owner. Thanks...!!
,
Sep 15 2017
Sorry @krajshree but thid doesn't look like a regression. If it was working before r434071, it was just because CSS Grid Layout was not shipped. I guess you were not testing it with the --enable-experimental-web-platform-features flag on the previous revisions. Anyway I can keep the ownership until we clarify what's the problem in the codepen.
,
Sep 15 2017
It seems like it's not an issue in this reduced test case: https://codepen.io/una/pen/VMLVeJ .. interesting
,
Sep 15 2017
It appears that pasting in the emoji was introducing whitespace (with a ctrl+shift+v instead of ctrl+v there isn't an issue). As a related aside, this is also true in editing style blocks anywhere in Chrome vs. FireFox (in Chrome whitespace is added when you're not careful to use shift+enter to make new lines, while FF ignores this whitespace, and its safe to just use enter to make new lines)
,
Sep 18 2017
Ok, I see it now, the problem is not the whitespaces, but that when you paste with "Ctrl+V" it adds a new <span> element like: <span style="font-size: 17.6px;">↕️</span> Adding "font-size: 1.1em;" to the reduced test case causes the same problem. And it happens even without emojis. And in a regular block too. Attaching a new reduced example to reproduce the issue. The result in this case is different comparing Chromium and Firefox: * Chromium: <div contenteditable=""> test<span style="font-size: 17.6px;">test</span> </div> * Firefox: <div contenteditable=""> testtest </div>
,
Sep 21 2017
Returning to blink queue for triage (right now it's a Pri=1 regression with no owner).
,
Sep 22 2017
We need to revise handling font size on clipboard. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by mikelawther@chromium.org
, Sep 14 2017