node-edit-protection module not working in CK Editor window I am using node-edit-protection module to alert a user if they are navigating away from a modified Node Edit form without saving. It worked fine if we edit title or any other fields. But not worked if we change the body part. I am using CKeditor in body part.
Open node-edit-protection.js file in module's folder,
Find this code

window.onbeforeunload = function() {
     if (edit &amp;&amp; !click) {
     click = false;
            return (Drupal.t("You will lose all unsaved work."));
     }
}


replace above code with following

    window.onbeforeunload = function() {
    if (typeof(Drupal.settings.ckeditor) != 'undefined' &amp;&amp; typeof(CKEDITOR) != 'undefined' &amp;&amp; typeof(CKEDITOR.instances) != 'undefined') {
         for (var i in CKEDITOR.instances) {
          if (CKEDITOR.instances[i].checkDirty()) {
           edit = true;
           break;
          }
         }
        }

         if (edit &amp;&amp; !click) {
          click = false;
          return (Drupal.t("You will lose all unsaved work."));
  }
}