Make WordPress Core

Ticket #18341: 18341.patch

File 18341.patch, 725 bytes (added by SergeyBiryukov, 14 years ago)
  • wp-includes/js/autosave.dev.js

     
    6161        doPreview = function() {
    6262                $('input#wp-preview').val('dopreview');
    6363                $('form#post').attr('target', 'wp-preview').submit().attr('target', '');
     64
     65                /*
     66                 * Workaround for WebKit bug preventing a form submitting twice to the same action.
     67                 * https://bugs.webkit.org/show_bug.cgi?id=28633
     68                 */
     69                if ( $.browser.safari ) {
     70                        $('form#post').attr('action', function(index, value) {
     71                                return value + '?t=' + new Date().getTime();
     72                        });
     73                }
     74
    6475                $('input#wp-preview').val('');
    6576        }
    6677