Completed
Last Updated: 15 May 2019 09:05 by ADMIN
ADMIN
Rumen
Created on: 17 Jul 2018 10:57
Category: Editor
Type: Bug Report
4
setFocus doesn't set the focus on RadEditor when called for a second time in Chrome
Can be reproduced with the code below:

<telerik:RadEditor runat="server" ID="RadEditor1" >
    <Content>
   Here is sample content!
    </Content>
</telerik:RadEditor>
 
<input type="button" value="Set Focus On RadEditor" onclick="SetFocusOnRadEditor(); return false;" />
<script type="text/javascript">
    function SetFocusOnRadEditor() {
        var editor = $find("<%=RadEditor1.ClientID%>"); //get a reference to RadEditor client object
            editor.setFocus(); //set the focus on the the editor
    }
</script>


The problem is not reproducible when the ContentAreaMode is set to DIV or in the other browsers.

Workaround

<telerik:RadEditor runat="server" ID="RadEditor1">
    <Content>
    Here is sample content!
    </Content>
</telerik:RadEditor>
 
<button type="button"  onclick="SetFocusOnRadEditor()">Focuse On RadEditor</button>
<script type="text/javascript">
    function SetFocusOnRadEditor() {
        var editor = $find("<%=RadEditor1.ClientID%>");
        if ($telerik.isChrome) {
            var iframe = editor.get_contentAreaElement();
            iframe.contentWindow.document.body.focus();
        }
        else {
                editor.setFocus();
        }
    }
</script>
1 comment
ADMIN
Rumen
Posted on: 15 May 2019 09:05
The problem is fixed internally and the hotfix will appear in the upcoming Latest Internal Build. We will notify you further when the LIB is ready to download.