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

[Solved] Editor doesn't work in Firefox when it is loaded via Ajax in a multiview

4 Answers 85 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Eric Yee
Top achievements
Rank 1
Eric Yee asked on 19 Jun 2009, 09:51 AM
Hi Telerik!
I have a page with a multiview.  The views are loaded using Ajax.  The editor is located in the second view.  In Firefox, when I click on "View 2", I am unable to type in the editor 50% of the time.  None of the buttons and dropdowns work either.  The editor will stop working completely if I switch between "View 1" and "View 2" a couple of times.

Below is the code sample that can reproduce the problem.  I am using Firefox 3.0.11 and version 2009.1.527.35 of Telerik.Web.UI.dll.

 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="telerik.aspx.cs" Inherits="OFF_LIMIT.telerik" %>  
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>  
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
  <title></title>  
</head>  
<body>  
  <form id="form1" runat="server">  
    <asp:ScriptManager ID="ScriptManager1" runat="server" />  
      
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">  
    <ContentTemplate>  
      <p>  
        <asp:LinkButton ID="button1" runat="server" Text="View 1" /> >  
        <asp:LinkButton ID="button2" runat="server" Text="View 2" />  
      </p>  
        
      <asp:MultiView ID="multiview" runat="server" ActiveViewIndex="0">  
        <asp:View ID="view1" runat="server">  
          view 1  
        </asp:View>  
        <asp:View ID="view2" runat="server">  
          <telerik:RadEditor ID="m_editor" runat="server" />  
        </asp:View>  
      </asp:MultiView>  
    </ContentTemplate>  
  </asp:UpdatePanel>  
  </form>  
</body>  
</html>  
 
<script runat="server">  
  protected override void OnInit(EventArgs e)  
  {  
    base.OnInit(e);  
    button1.Command += new CommandEventHandler(OnCommand);  
    button2.Command += new CommandEventHandler(OnCommand);  
  }  
 
  void OnCommand(object sender, CommandEventArgs e)  
  {  
    LinkButton button = sender as LinkButton;  
 
    if (button.ID == button1.ID)  
      multiview.ActiveViewIndex = 0;  
    else if (button.ID == button2.ID)  
      multiview.ActiveViewIndex = 1;  
  }  
</script> 

4 Answers, 1 is accepted

Sort by
0
Eric Yee
Top achievements
Rank 1
answered on 19 Jun 2009, 09:58 AM
Additional info: if I switch the editor to HTML mode then back to Design mode, then I will be able to type in the editor again.  The buttons will still be non-responsive.
0
Lini
Telerik team
answered on 23 Jun 2009, 10:36 AM
Hello,

I think this problem was reported by another customer and is already fixed. Please download the latest internal build from our site (http://www.telerik.com/account/latest-internal-builds.aspx) and update your project. If the problem persists, open a support ticket and send us a simple project that we can use to reproduce the problem.

Best wishes,
Lini
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Tom
Top achievements
Rank 1
answered on 04 Oct 2009, 05:11 PM
Hi,

We are using version 2009.1.527.35 and we are facing the same issue of Editor not working in some Firefox versions. But we would not prefer to upgrade to the latest version as it would force us to regress our whole application and it will be a big effort. Is there any option that we would be able to just get this fix in without making the upgrade or any work around?

Thanks in Advance

0
Rumen
Telerik team
answered on 07 Oct 2009, 12:01 PM
Hi Scott,

If you are unable to upgrade to the latest version then the solution is to attach the code below to the OnClientInit event property of RadEditor:
 
    <script type="text/javascript">  
    function OnClientInit(editor) {  
        var editorWidth = editor.get_element().style.width;  
         
        editor.add_firstShow(function() {  
            editor.get_element().style.width = editorWidth;  
        });  
    }  
    </script>  
 

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
Eric Yee
Top achievements
Rank 1
Answers by
Eric Yee
Top achievements
Rank 1
Lini
Telerik team
Tom
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or