Completed
Last Updated: 19 Jan 2017 09:39 by ADMIN
ADMIN
Ianko
Created on: 19 Aug 2013 16:12
Category: Editor
Type: Bug Report
0
FIX JavaScript errors on pasting content with P element nested inside the RadEditor's content with SPAN and P elements under IE8 and 7
When the content of the editor is within a SPAN element, nested in a P, pasting data with P element inside it using the pasteHtml() method throws JavaScript errors and the SPAN element is broken by the nested P elements.

Steps to reproduce:
1.Set editor's content with this content: <p><span>Some text</span></p>

2.Use the editor's pasteHtml() method to paste this HTML in the middle of the above text: <p>Second text</p>

3.The result HTML is this:
<P><SPAN>Some</P>
<P>Second text</P>
<P>&nbsp;text</SPAN><SPAN>​</SPAN></P>

 
2 comments
ADMIN
Ianko
Posted on: 20 Aug 2013 08:33
Indeed this scenario is forbidden by the W3C's HTML specification. 

The reason for this report is because in an older version of RadControls the described JavaScript errors are not being thrown in the same scenario. 
Keith
Posted on: 19 Aug 2013 17:37
Why are you trying to nest p tags? The editor cannot possibly support your requested behaviour, because it is rejected by the browser's DOM.