Multiple RadEditors in Widget Designer (Firefox only)
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
;
);
;
LB.WidgetDesigner.RadEditorTabFix($find(
"RadEditor1"
));
LB.WidgetDesigner.RadEditorTabFix($find(
"RadEditor2"
));
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
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(
"
"
);
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>
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