Change ,blur,Focus events are not working for contenteeditable div , please find code below :
$(".editForm :input, div[contenteditable=true]").on('change', function (i, e) {
if ($(i.target).hasClass("ignorePreventRedirection")) {
$(i.target).removeClass('ignorePreventRedirection');
return true;
}
anyFormElementModified = true;
});
$(".editForm :input, div[contenteditable=true]").on('focus', function (i, e)
{
if (i.srcElement !== undefined)
{
focusValue = i.srcElement.tagName === "DIV" ? i.srcElement.innerHTML : i.srcElement.value;
wasFocused = true;
}
});
$(".editForm :input, div[contenteditable=true]").on('blur', function (i, e)
{
if (i.srcElement !== undefined)
{
var newValue = i.srcElement.tagName === "DIV" ? i.srcElement.innerHTML : i.srcElement.value;
if (newValue !== focusValue && wasFocused)
{
anyFormElementModified = true;
}
}
});