Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using classes for font-size causes nesting issues #1951

Open
iplukens opened this issue May 4, 2018 · 1 comment
Open

Using classes for font-size causes nesting issues #1951

iplukens opened this issue May 4, 2018 · 1 comment
Labels
plugin:font The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug.

Comments

@iplukens
Copy link

iplukens commented May 4, 2018

Are you reporting a feature request or a bug?

Bug

When using classes for font-sizes instead of styling, you can get nesting issues.

Provide detailed reproduction steps (if any)

  1. Set up font size to use classes instead of style attribute
window.CKEDITOR.config.fontSize_style = {
    element: 'span',
    attributes: {'class': '#(size)'},
    overrides: [{
      element: 'font',
      attributes: {'size': null},
    }],
  };
  1. Type text in ckeditor
    <p>Hello this is some text</p>
  2. Apply font size to inner text
    <p>Hello this <span class="x-large">is</span> some text</p>
  3. Select the whole text and apply a different font size

Expected result

What is the expected result of the above steps?
<p><span class="x-small">Hello this is some text</span></p>
The inner span styling of x-large should be removed similar to how the font-size would get removed.

Actual result

What is the actual result of the above steps?
<p><span class="x-small">Hello this <span class="x-large">is</span> some text</span></p>
The inner styling remains.

  • Browser: All
  • OS: All
  • CKEditor version: 4.7.3
  • Installed CKEditor plugins: FontSize

JSFiddle: https://jsfiddle.net/yroL0vnk/
Gif of bug: http://g.recordit.co/oNbSSCUCXa.gif

@jacekbogdanski jacekbogdanski self-assigned this May 9, 2018
@jacekbogdanski
Copy link
Member

jacekbogdanski commented May 9, 2018

Hello,

I can reproduce the issue. It could be related to #1186 and #1116.
You can reproduce the issue using https://codepen.io/jacekbogdanski/pen/XqZjXK codepen.

@jacekbogdanski jacekbogdanski removed their assignment May 9, 2018
@jacekbogdanski jacekbogdanski added type:bug A bug. status:confirmed An issue confirmed by the development team. plugin:font The plugin which probably causes the issue. labels May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin:font The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug.
Projects
None yet
Development

No branches or pull requests

2 participants