1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Multiple RadEditors in Widget Designer (Firefox only)

Multiple RadEditors in Widget Designer (Firefox only)

4 posts, 0 answered
  1. Chris
    Chris avatar
    37 posts
    Registered:
    18 Jan 2012
    28 Mar 2012
    Link to this post
    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
  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    16 Aug 2017
    02 Apr 2012
    Link to this post
    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
  3. Rumen
    Rumen avatar
    26 posts
    Registered:
    27 Jul 2017
    09 Apr 2012
    Link to this post
    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
  4. Chris
    Chris avatar
    37 posts
    Registered:
    18 Jan 2012
    11 Apr 2012
    Link to this post
    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
4 posts, 0 answered