New Line Resets Font in Chrome

2 posts, 0 answers
  1. john becker
    john becker avatar
    3 posts
    Member since:
    Jan 2006

    Posted 24 Mar Link to this post

    Doing the following in IE will result in both lines being set to 20px:

    • set the font size to a non-default size (in this case 20px)
    • type some text
    • hit enter for a new line
    • type some text

    The same thing done in Chrome results in only the first line being 20px, with the second line being set back to the default font size.

    Here is the resulting HTML in IE:
    <span style="font-size: 20px;">first line<br> second line</span>

    and in Chrome:
    <span style="font-size: 20px;">first line<br></span>second line

    Is there anything that can be done to have Chrome behave like IE in this situation, so that new lines will still be within the font setting span tag?  Using v 2014.1.225.45.

  2. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 29 Mar Link to this post

    Hello John,

    This is most likely because of how browser acts when entering new line. And as it is browser dependent it is difficult to alter its behavior. 

    However, testing with the most recent version here (http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx), the new line command with BR tag seems to be improved and the required behavior is the same as you expect. Therefore, I suggest you upgrading the UI for ASP.NET AJAX suite and test again the same scenario. 

    Regards,
    Ianko
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top