This is a migrated thread and some comments may be shown as answers.

New Line Resets Font in Chrome

1 Answer 85 Views
Editor
This is a migrated thread and some comments may be shown as answers.
john becker
Top achievements
Rank 1
john becker asked on 24 Mar 2016, 12:44 PM

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.

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 29 Mar 2016, 05:21 AM
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.
Tags
Editor
Asked by
john becker
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or