RadEditor OnBlur event doesn't fire

3 posts, 0 answers
  1. msigman
    msigman avatar
    141 posts
    Member since:
    Apr 2008

    Posted 29 Sep 2010 Link to this post

    I am attaching a handler for the onblur event of my radeditor, but it never fires.  If I substitute onclick instead it does work.

    Is there a trick to get the onblur to firing with a radeditor?
  2. Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 30 Sep 2010 Link to this post

    Hello Matthew,

    You can try the following functions to attach to the blur event:

    Example 1:
    <telerik:RadEditor ID="RadEditor1" runat="server"  OnClientLoad="OnClientLoad"></telerik:RadEditor>
    <script type="text/javascript">
       function OnClientLoad(editor, args) {
           var element = document.all ? editor.get_document().body : editor.get_document();
           $telerik.addExternalHandler(element, "blur", function(e) {
               alert("RadEditor loosed focus");       
           });
       }
    </script>


    Example2:
    <telerik:RadEditor ID="RadEditor1" runat="server" ContentAreaMode="Div" OnClientLoad="OnClientLoad"></telerik:RadEditor>
    <script type="text/javascript">
        function OnClientLoad(editor, args) {
            editor.attachEventHandler("blur", function (e) {
                alert("Blur fired");
            });
        }
    </script>



    All the best,
    Rumen
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. msigman
    msigman avatar
    141 posts
    Member since:
    Apr 2008

    Posted 30 Sep 2010 Link to this post

    Thank you, that works.  We were using "onblur" instead of "blur," and omitted the ContentAreaMode setting.
Back to Top