Unplanned
Last Updated: 30 Dec 2019 15:59 by ADMIN
Bhaskar
Created on: 22 Nov 2019 00:44
Category: Editor
Type: Bug Report
0
radEditor.Content duplicates the content on Google Chrome when style @import url is used

On Google Chrome, the following assingment ends up displaying the body of the html twice within the editor:

radEditor.Content="<HTML><HEAD><STYLE>@import url(./CSS/CI.css);</STYLE></HEAD><BODY><H3>OUTPUT LAYOUT</H3><P>First Name:</P><P>Kerry</P></BODY></HTML>"

The resulting html becomes:
"<html><head><link href="/WebResource.axd?d=IgLlf5SIEZ-4m-Qr1qYVOGbMUL9-osMaMQXxs1c-ODIbmiiieGrgJ2ZuegoRNaCpJJ5zKojqJuk_FD7Cb69kb713UUGq1dCMsrFtihWFgnKkbYnlqQv7Lo2rUoUhmXHopZnTw7Cs3STs4GHdRuMnVHVdYHhRrcdV8Dgdv-U213Y1&amp;t=637050242483188892" type="text/css" id="RADEDITORSTYLESHEET0" rel="stylesheet"></head><body><h3>OUTPUT LAYOUT</h3><p>First Name:</p><p>Kerry</p><h3>OUTPUT LAYOUT</h3><p>First Name:</p><p>Kerry</p></body></html>"

The issue is the "@import url(./CSS/CI.css);" within the Style tag, if the @import url, is removed, then it works as expected.

Works as expected on IE11.

If you add 2 <style> tags, the second one is displayed twice within the editor:

radEditor.Content = "<HTML><HEAD></HEAD><BODY><H3>OUTPUT LAYOUT</H3><P>First Name:</P><P>Kerry</P><style>@import url(\"./CSS/CI.css\");</style><style>@import url(\"./CSS/CI2.css\");</style></BODY></HTML>";
  
1 comment
ADMIN
Rumen
Posted on: 28 Nov 2019 10:40

Hi there,

Thank you for reporting both problems for the duplicated style and scripts tags! Your feedback is much appreciated and your Telerik points updated.

The temporary workarounds is to place the styles and script tags in the body tag and preferable before the closing body tag.

It is also good to place all the @imports in a single <style> tag.

Regards,
Rumen
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.