Customize: Prevent previewer from appearing to freeze when refreshing too fast.
Fixes race condition issue where a previous iframe fails to get destroyed, leaving a iframe pending loading persistently shown. Props nikeo, westonruter. Fixes #38728. Built from https://develop.svn.wordpress.org/trunk@39199 git-svn-id: http://core.svn.wordpress.org/trunk@39139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
99f0a4de76
commit
2b81ceddf9
|
@ -3930,18 +3930,18 @@
|
|||
} );
|
||||
|
||||
previewer.loading.done( function( readyData ) {
|
||||
var loadingFrame = this, previousPreview, onceSynced;
|
||||
var loadingFrame = this, onceSynced;
|
||||
|
||||
previousPreview = previewer.preview;
|
||||
previewer.preview = loadingFrame;
|
||||
previewer.targetWindow( loadingFrame.targetWindow() );
|
||||
previewer.channel( loadingFrame.channel() );
|
||||
|
||||
onceSynced = function() {
|
||||
loadingFrame.unbind( 'synced', onceSynced );
|
||||
if ( previousPreview ) {
|
||||
previousPreview.destroy();
|
||||
if ( previewer._previousPreview ) {
|
||||
previewer._previousPreview.destroy();
|
||||
}
|
||||
previewer._previousPreview = previewer.preview;
|
||||
previewer.deferred.active.resolve();
|
||||
delete previewer.loading;
|
||||
};
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-beta2-39198';
|
||||
$wp_version = '4.7-beta2-39199';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue