extra <br> added in Firefox when editor is hidden when loaded

5 posts, 1 answers
  1. Trevor
    Trevor avatar
    53 posts
    Member since:
    Jan 2012

    Posted 07 May 2014 Link to this post

    Discovered a problem on the latest editor, latest Firefox. If the editor is initially hidden when loaded, an extra <br> will be added to the existing content.

    The behavior does not exist in Chrome or IE. The behavior does not exist in the previous version of the editor that we had (2012.2.724.40)

    This is a significant problem for us.  Can you provide a solution?

    Thanks,
    Trevor.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 08 May 2014 in reply to Trevor Link to this post

    Hi Trevor,

    Unfortunately I couldn't replicate the issue on latest telerik version of  RadEditor in latest FireFox. Please have a look into the sample code snippet which works fine at my end. Please provide a sample code where I can reproduce the issue for further help.

    ASPX:
    <telerik:RadEditor ID="radeditorHidden" runat="server" Visible="false">
    </telerik:RadEditor>
    <telerik:RadTextBox ID="radtxtCheckText" runat="server" Text="This is an exmaple line">
    </telerik:RadTextBox>

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Trevor
    Trevor avatar
    53 posts
    Member since:
    Jan 2012

    Posted 08 May 2014 in reply to Princy Link to this post

    Hi,

    I'll include the aspx file for a simple test that demonstrates the problem. It's not hard to reproduce and it is unfortunate I have to prepare a sample for you.

    As I mentioned, this is a critical issue, since every time the user saves their content, another BR tag is added.  We can't unconditionally remove the BR tag because we have no way of knowing whether the user added it or the Editor added it.

    Please provide a solution to this problem.

    Thanks,
    Trevor.


    ASPX:

    <%@ Page Language="vb" AutoEventWireup="false" Codebehind="TelerikTest.aspx.vb" Inherits="IronPoint.TelerikTest" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

    <html>
    <body>
    <form runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <h2>BR tag added when editor is initially hidden - Firefox only - editor version 2014.1.403.45</h2>
    <h2>click button then switch to HTML mode - you will see a BR tag at the bottom</h2>
    <div id="divWrapper" style="display:none">
    <telerik:RadEditor runat="server" ID="RadEditor1">
        <Content>
            <p>this is line one</p>
            <p>this is line two</p>
            <p>this is line three</p>
            <p>this is line four</p>
        </Content>
    </telerik:RadEditor>
    </div>
    <input type="button" onclick="document.getElementById('divWrapper').style.display='';" value="Show Editor" />
    </form>
    </body>
    </html>

  5. Answer
    Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 12 May 2014 Link to this post

    Hello Trevor,

    The mentioned behavior is encountered becuase of the initially hidden state and a logic in the RadEditor because of which the onParentNodeChanged() method is called automatically. 

    This method has an already logged bug and I suggest following the public feedback portal item for a possible resolution.

    Also, when it comes to programmatic showing and hiding of the Editor, it is recomended to use the repaint() method to fix layout issues. More about this is explained in this help article.

    Regards,
    Ianko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Trevor
    Trevor avatar
    53 posts
    Member since:
    Jan 2012

    Posted 15 May 2014 in reply to Ianko Link to this post

    The suggested solution seems to have solved the problem for us.  Thank you.

    Trevor.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017