I have an editor configured like this:
@(Html.Kendo().EditorFor(m => m.MyTextData)
.Tag("div")
.Name("MyTextData")
.Resizable(x =>
{
x.Content(true);
x.Min(120);
x.Max(400);
x.Toolbar(false);
})
.StyleSheets(css => css.Add(Url.ContentVersioned("~/Content/EditorStyles.css")))
.Encode(false)
.Events(e => e.Change("onEditorChangeOfContent"))
.Tools(tools => tools
.Clear()
.Bold()
.Italic()
.Underline()
.JustifyLeft()
.JustifyCenter()
.JustifyRight()
.InsertUnorderedList()
.InsertOrderedList()
.InsertLowerRomanList()
.InsertUpperRomanList()
.Indent()
.Outdent()
.FirstLineIndent()
.SubScript()
.SuperScript()
.TableEditingWithCellBorder()
)
)
When first clicking in the editor text area then clicking out of the text area without changing any of the text, the blur function is called and in the blur function a comparison is made between "value" and "old". In this first call to blur, old is undefined so the match is not made and the change event is triggered as if the text was changed. Note that if the same action of clicking in and out of the text area is done again, old contains the correct value and no change event is triggered, so it works differently the second time. The change event should not be triggered on the first action as the text was not changed.
Here is the blur function in Kendo:
_blur: function() {
var textarea = this.textarea;
var old = textarea ? textarea.val() : this._oldValue;
var value = this.options.encoded ? this.encodedValue() : this.value();
this.update();
if (textarea) {
textarea.trigger("blur");
}
if (value != old) {
this.trigger("change");
if (textarea) {
textarea.trigger("change");
}
}