Make WordPress Core

Changeset 4507


Ignore:
Timestamp:
11/21/2006 01:39:09 AM (18 years ago)
Author:
ryan
Message:

Kill form submission during autosave.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/wp-includes/js/autosave.js.php

    r4506 r4507  
    1010    autosavePeriodical = new PeriodicalExecuter(autosave, <?php echo apply_filters('autosave_interval', '16'); ?>);
    1111    //Disable autosave after the form has been submitted
    12 //  if(form.addEventListener) {
    13 //      form.addEventListener("submit", function () { autosavePeriodical.currentlyExecuting = true; }, false);
    14 //  }
     12    if(form.addEventListener) {
     13        form.addEventListener("submit", function () { autosavePeriodical.currentlyExecuting = true; }, false);
     14    }
    1515    if(form.attachEvent) {
    16         form.attachEvent("onsubmit", function () { autosavePeriodical.currentlyExecuting = true; });
     16        $('save').attachEvent("onclick", function () { autosavePeriodical.currentlyExecuting = true; });
     17        $('publish').attachEvent("onclick", function () { autosavePeriodical.currentlyExecuting = true; });
     18        $('deletepost').attachEvent("onclick", function () { autosavePeriodical.currentlyExecuting = true; });
    1719    }
    1820}
Note: See TracChangeset for help on using the changeset viewer.