Multiple RadEditors in Widget Designer (Firefox only)

Posted by Community Admin on 04-Aug-2018 21:21

Multiple RadEditors in Widget Designer (Firefox only)

All Replies

Posted by Community Admin on 28-Mar-2012 00:00

I've come across an issue with multiple RadEditors in a widget designer in Firefox. Specifically, the focus of the second RadEditor isn't picked up properly when clicked.

Firefox has this weird issue with RadEditors where you have to do a tab fix in Javascript (which I believe was done based on advice from people on this board). Here's the code for that:

LB.WidgetDesigner.RadEditorTabFix = function (editor)
    $("input").focus();
    editor.attachEventHandler("onkeydown", function (e)
        if (e.keyCode == '9')
            editor.pasteHtml("    ");
            if (!document.all)
                e.preventDefault();
                e.preventBubble();
                e.stopPropagation();
             else
                e.returnValue = false;
                e.cancelBubble = true;
            
        
    );
;
In the _pageLoadHandler, the code is called as follows:
LB.WidgetDesigner.RadEditorTabFix($find("RadEditor1"));
LB.WidgetDesigner.RadEditorTabFix($find("RadEditor2"));
I believe the problem is related to the first line of the actual function code ($("input").focus();), since that seems to be just finding the first RadEditor.

I'm having trouble getting my selectors correct to get the correct RadEdiyor. Any help with that would be greatly appreciated.

Thanks,
Chris

Posted by Community Admin on 02-Apr-2012 00:00

Hi Chris,

We'll need some additional time to research this issue and will get back to you once we have updated information on the topic. Thank you in advance for your kind understanding.

Kind regards,
Boyan Barnev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 09-Apr-2012 00:00

Hi Chris,

I tested the standalone RadEditor on a standard ASPX page and I was unable to reproduce the reported Firefox issue. Could you please see the following video http://screencast.com/t/QJyiyY1pxf and let me know if I am missing something?

Here is my code:

<asp:ScriptManager ID="Scriptmanager1" runat="server" />
<telerik:RadEditor ID="RadEditor1" runat="server">
    <Content>test</Content>
</telerik:RadEditor>
<telerik:RadEditor ID="RadEditor2" runat="server">
    <Content>test</Content>
</telerik:RadEditor>
<input type="text" />
<script type="text/javascript">
    function RadEditorTabFix(editor)
        $telerik.$("input").focus();
        editor.attachEventHandler("onkeydown", function (e)
            if (e.keyCode == '9')
                editor.pasteHtml("&nbsp;&nbsp;&nbsp;&nbsp;");
                if (!document.all)
                    e.preventDefault();
                    e.preventBubble();
                    e.stopPropagation();
                 else
                    e.returnValue = false;
                    e.cancelBubble = true;
                
            
        );
    
 
    function pageLoad()
        var editor1 = $find("<%=RadEditor1.ClientID%>");
        var editor2 = $find("<%=RadEditor2.ClientID%>");
        RadEditorTabFix(editor1);
        RadEditorTabFix(editor2);
    
</script>


All the best,
Rumen
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 11-Apr-2012 00:00

Rumen,

Yes, there are a couple things missing here that I believe are important.

1. This is not on a standard ASPX page. This is on a custom widget control designer. The tab fix is being called in the _pageLoadHandler function of the control designer. This could very easily be causing interference.
2. We are currently running Sitefinity 4.3. I'm assuming you're using 5.0, which we are currently looking at upgrading to.

Thanks,
Chris

This thread is closed