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

Issue 770620 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

justifying with execCommand adds span with font-size

Reported by jorritsc...@gmail.com, Oct 2 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce the problem:
1. Add a contenteditable element in a document which inherits a relative font size such as 0.8em.
2. Focus the element.
3. Add text to the element.
3. Execute justifyRight using document.execCommand().

What is the expected behavior?
The innerHTML of the element should be like:

<div style="text-align: right;">aa</div>

What went wrong?
The innerHTML is:

<div style="text-align: right;"><span style="font-size: 0.8em;">aa</span></div>

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 61.0.3163.100  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 27.0 r0

Setting exact font sizes on the element or a parent element prevents the span from being added.
 
test.html
287 bytes View Download
Labels: Needs-Triage-M61
It works fine in Firefox 56.0.
Cc: ranjitkan@chromium.org
Labels: M-63 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Rechecked this issue on Windows 10, Mac 10.12.6, Ubuntu 14.04. on chrome stable 61.0.3163.100 and able to reproduce it. Issue is a non regression as observed from M50 - 50.0.2624.0. builds.

Issue is not observed on firefox browser. Untriaged it so that issue gets addressed.
Components: Blink>Editing>Command

Comment 5 by yosin@chromium.org, Dec 6 2017

Labels: Pri-3
Status: Available (was: Untriaged)
Project Member

Comment 6 by sheriffbot@chromium.org, Dec 6

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
Status: Available (was: Untriaged)

Sign in to add a comment