CSS lost while working in Chrome

8 posts, 0 answers
  1. Erick
    Erick avatar
    81 posts
    Member since:
    Feb 2010

    Posted 07 Mar 2012 Link to this post

    Hi,

    I have a issue while working with the editor in Google Chrome and reproduced this in the latest version of the Editor (demos).
    Juist add this simple HTML:

    <table>
        <tbody>
            <tr>
                <td style="font-family: arial; font-size: 11px;">
                This is a text <br />
    This is a bigger text
                </td>
            </tr>
        </tbody>
    </table>

    At design, change the fontsize of the second rule.
    You'll see Chrome will delete font-family: arial from inline CSS.
    Sometimes (with older version), the font-size will be removed also.

    This will cause problems when the user adds extra texts outside changed font-size.
    The font-familty will not be added to the second text 

    Is this a browser related problem or can this be fixed?
    This don't happen in IE and FF.

    Edit:
    It seems happen to all WebKit based browsers: Chrome, Opera and Safari.
    I've tested other wysiwyg editors, this dont happens in other editors.
    Seems a bug in your editor.
  2. Rumen
    Admin
    Rumen avatar
    14374 posts

    Posted 08 Mar 2012 Link to this post

    Hi,

    Thank you for reporting this problem.

    I reproduced and logged it for fixing in our PITS system. Here you can find the PITS Issue: Public URL.

    As a temporary solution you can replace the RealFontSizes tool with the FontSize tool, which works in the expected mean in all browsers.

    I also updated your Telerik points for your feedback and bug report.

    Best regards,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Erick
    Erick avatar
    81 posts
    Member since:
    Feb 2010

    Posted 08 Mar 2012 Link to this post

    Do you know when the bug will be fixed?
    Our editor uses normal FontSizes already but same problem happens there.
    I can't reproduce this but it was happen by our users.

    I've tested the same code with normal FontSizes, the problem is conversely now.
    When changing the fontsize of one rule text, the font-size is removed from inline CSS.
    When adding a new rule text, this will get none font-size.

    Edit:
    I've reproduced this, with same code:
    Change the font-family of second rule to tahoma.
    The font-family arial is removed from inline CSS.
    Add a new text from copy/paste, this will get no font-face.

    So changing to normal FontSizes will not fix this.
    Is there no a javascript to prevent changing of style attribute?
  4. Rumen
    Admin
    Rumen avatar
    14374 posts

    Posted 09 Mar 2012 Link to this post

    Hi,

    I researched the problem in more details and it appeared to be a WebKit bug. Since you are the first one to report it and there is not a quick solution for it I could not provide a firm estimate when it will be fixed. The PITS issue is public and if more clients vote for its fixing, we will raise its priority in the system.

    In addition the FontSize command of RadEditor actually executes the browser command (document.execCommand("FontSize")) and the problems related to it are again browser related.


    Best regards,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Erick
    Erick avatar
    81 posts
    Member since:
    Feb 2010

    Posted 16 Apr 2012 Link to this post

    Hi,

    Do you known when this bug will be fixed?
    We and our customers are waiting for this.

    When fixing of this bug is taking so long, we're forced to switch to other HTML editor.
  6. Rumen
    Admin
    Rumen avatar
    14374 posts

    Posted 18 Apr 2012 Link to this post

    Hello,

    Could you please see my test with the FontSize tool in the following video: http://screencast.com/t/n5yJHIhrI?

    I was also unable to reproduce the font-family strip problem:
    Change the font-family of second rule to tahoma.
    The font-family arial is removed from inline CSS.

    My Google Chrome version is the latest one 18.0.1025.162.

    Greetings,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  7. Erick
    Erick avatar
    81 posts
    Member since:
    Feb 2010

    Posted 23 Apr 2012 Link to this post

    I've tested this again, with the latest version of Chrome. It seems this version will handle this much better, all texts will always get font-family and font-size. The inline CSS into TD element is still losing the font-family and font-size. 

    In not webkit based browsers, the inline CSS will stay in his original state. I know this is a browser behavoir, but i just want the CSS and HTML stay in his original state, not changed by browser of editor. I've tested this with other editors, by example the CKEditor. The inline CSS will not be stripped when i change the font-family or font-size. It's very important for us that the HTML code under no conditions will be changed. 

    The sample code above is a very small part of the HTML code we use. Our customers are typing so much texts into the tables and change the font-size or font-family of a textpart sometimes. This should be possible, with no losses of the original font-size or font-family.
  8. Rumen
    Admin
    Rumen avatar
    14374 posts

    Posted 23 Apr 2012 Link to this post

    Hello,

    I would ask you to use the FontSize tool until our developers improve the RealFontSize tool. As you can see in the following video http://screencast.com/t/n5yJHIhrI I was unable to replicate any issues related to FontSize and FontName dropdowns of RadEditor.

    Best regards,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top