Completed
Last Updated: 19 Jun 2015 14:34 by ADMIN
ADMIN
Ianko
Created on: 12 Jun 2015 09:52
Category: UI for ASP.NET AJAX
Type: Bug Report
0
SelectionChange event is not raised on mouseup when RadEditor is in RadWindow under Chrome and Firefox
When user clicks on e.g., bold text, comment, link, etc. the UI of RadEditor is not updated

Possible workaround is using the Window's Show event to attach a handler, that re-attaches the mouseup event of RadEditor with setTimeout:

<telerik:RadWindowManager runat="server" ID="RadWindowManager1">
    <Windows>
        <telerik:RadWindow runat="server" ID="RadWindow1" VisibleOnPageLoad="true" Width="800px" Height="500px" OnClientShow="OnClientShow">
            <ContentTemplate>
                <telerik:RadEditor ID="theEditor" runat="server" Width="100%" Height="100%" EnableComments="true">
                    <TrackChangesSettings Author="RadEditorUser" UserCssId="reU1"></TrackChangesSettings>
                    <Content>
                        <h2 class="titleText">RadEditor for ASP.NET AJAX</h2>
                        <p style="text-align: justify;"><span style="font-size: 19px; color: #4f6128;"><strong>RadEditor</strong></span>
                        is not simply an <strong>
                        <span class="reComment reU1" author="RadEditorUser" comment="comment 1" title="RadEditorUser: comment 1: 6/12/2015, 11:27:35 AM" timestamp="1434097655291">HTML</span></strong>
                        Editor.
                        <a href="http://www.telerik.com/products/aspnet-ajax/sharepoint.aspx">Link</a>.</p>
                    </Content>
                </telerik:RadEditor>
            </ContentTemplate>
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>

<script type="text/javascript">
    function OnClientShow(sender, args) {
        var editor = $find("<%= theEditor.ClientID %>");

        window.setTimeout(function () {
            editor.attachInternalHandler("mouseup", function () {
                editor.raiseEvent("selectionChange");
            });
        }, 0);
                
    }
</script>
0 comments