Index: wp-includes/js/autosave.js
===================================================================
--- wp-includes/js/autosave.js	(revision 8166)
+++ wp-includes/js/autosave.js	(working copy)
@@ -1,6 +1,8 @@
 var autosaveLast = '';
 var autosavePeriodical;
 var autosaveOldMessage = '';
+var autosaveDelayURL = null;
+var previewwin;
 
 jQuery(function($) {
 	autosaveLast = $('#post #title').val()+$('#post #content').val();
@@ -8,6 +10,16 @@
 
 	//Disable autosave after the form has been submitted
 	$("#post").submit(function() { $.cancel(autosavePeriodical); });
+	
+	// Autosave when the preview button is clicked. 
+	$('#previewview a').click(function(e) {
+		autosave();
+		autosaveDelayURL = this.href;
+		previewwin = window.open('','_blank');
+
+		e.preventDefault();
+		return false;
+	});
 });
 
 function autosave_parse_response(response) {
@@ -96,6 +108,16 @@
 			getpermalinknonce: jQuery('#getpermalinknonce').val()
 		}, function(permalink) {
 			jQuery('#previewview').html('<a target="_blank" href="'+permalink+'" tabindex="4">'+previewText+'</a>');
+
+			// Autosave when the preview button is clicked.  
+			jQuery('#previewview a').click(function(e) {
+				autosave();
+				autosaveDelayURL = this.href;
+				previewwin = window.open('','_blank');
+
+				e.preventDefault();
+				return false;
+			});
 		});
 	}
 }
@@ -125,6 +147,10 @@
 
 function autosave_enable_buttons() {
 	jQuery("#submitpost :button:disabled, #submitpost :submit:disabled").attr('disabled', '');
+	if ( autosaveDelayURL ) {
+		previewwin.location = autosaveDelayURL;
+		autosaveDelayURL = null;
+	}
 }
 
 function autosave_disable_buttons() {
Index: wp-includes/script-loader.php
===================================================================
--- wp-includes/script-loader.php	(revision 8166)
+++ wp-includes/script-loader.php	(working copy)
@@ -46,7 +46,7 @@
 		'broken' => __('An unidentified error has occurred.')
 	) );
 
-	$scripts->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080508' );
+	$scripts->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080622' );
 
 	$scripts->add( 'wp-lists', '/wp-includes/js/wp-lists.js', array('wp-ajax-response'), '20080411' );
 	$scripts->localize( 'wp-lists', 'wpListL10n', array(
