New issue
Advanced search Search tips

Issue 775649 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 3
Type: Feature



Sign in to add a comment

Spellcheck inserting HTML causes sibling elements to have bad formatting

Project Member Reported by mollyf@google.com, Oct 17 2017

Issue description

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

Steps to reproduce the problem:
1. Create a span in a content editable div that inherits from its parents and has a misspelled word.
2. Correct the misspelled word.

Here is a JSFiddle that allows you to reproduce this: https://jsfiddle.net/1utet6z9/1/

1. Click 'sppell' in the output, lower right square.
2. Correct to 'spell'
3. Observe behavior

What is the expected behavior?
Correct word should be inserted into the HTML, and the rest of the HTM L should remain untouched.

What went wrong?
HTML elements surrounding the corrected word get encapsulated into non-sense <font> tags which causes them to be the wrong font color and font family.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 60.0.3112.90  Channel: n/a
OS Version: OS X 10.12.6
Flash Version: 

I am a Google employee (SWE) and I encountered this while developing an internal Google app. Please feel free to reach out to mollyf@ for more information. This bug blocks a feature release so if possible please CC me on it.
 

Comment 1 by mollyf@google.com, Oct 17 2017

Confirmed that this does not happen on Firefox
Labels: OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Windows
Status: Available (was: Unconfirmed)
A workaround is to remove all the "color: inherit; font-size: inherit; font-family: inherit" stuff since that happens automatically anyway.

The bug(s) is likely in either ApplyStyleCommand::ApplyInlineStyleChange() or StyleChange::ExtractTextStyles().

Comment 3 by yosin@chromium.org, Oct 18 2017

Components: -Blink>Editing Blink>Editing>Command
Labels: -Type-Bug -Pri-2 Pri-3 Type-Feature
WebKit also does same thing. Per #c6, please attempt to remove redundant inline
styles. 

Comment 4 by mollyf@google.com, Oct 18 2017

Thanks for the quick response. Unfortunately for our use case we cannot remove the inline inherit styles, they are used to make pasted content match its parent's styles. The JSFiddle example is a simplified version of what our HTML looks like.
If we fix this bug, the earliest we can get it into a Chrome release is M64, which won't go out until late January, and you will still encounter this bug in Safari, which we have no control over. If you want to launch your feature earlier or have it work in Safari, you would still need to work around the bug.

Comment 6 by mollyf@google.com, Oct 18 2017

Our app is an internal Google app that's run on Chrome only, so other browsers are not a concern. But thank you for the info on when the earliest we could see a fix is. We will try to come up with a work-around in Chrome.
Project Member

Comment 7 by sheriffbot@chromium.org, Oct 19

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