This is a migrated thread and some comments may be shown as answers.

RadEditor OnBlur event doesn't fire

2 Answers 266 Views
Editor
This is a migrated thread and some comments may be shown as answers.
msigman
Top achievements
Rank 2
msigman asked on 29 Sep 2010, 10:27 PM
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 Answers, 1 is accepted

Sort by
1
Rumen
Telerik team
answered on 30 Sep 2010, 09:47 AM
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
0
msigman
Top achievements
Rank 2
answered on 30 Sep 2010, 03:14 PM
Thank you, that works.  We were using "onblur" instead of "blur," and omitted the ContentAreaMode setting.
Tags
Editor
Asked by
msigman
Top achievements
Rank 2
Answers by
Rumen
Telerik team
msigman
Top achievements
Rank 2
Share this question
or