diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js
index 7c4a631..79bd146 100644
a
|
b
|
|
2153 | 2153 | api.previewer.previewUrl( api.settings.url.home ); |
2154 | 2154 | } |
2155 | 2155 | |
| 2156 | // Trigger 'unload' event when user navigate around during preview |
| 2157 | api.previewer.previewUrl.bind(function () { |
| 2158 | api.previewer.send( 'unload' ); |
| 2159 | }); |
| 2160 | |
2156 | 2161 | // Save and activated states |
2157 | 2162 | (function() { |
2158 | 2163 | var state = new api.Values(), |
diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php
index b695271..4a6e4a5 100644
a
|
b
|
final class WP_Customize_Manager { |
432 | 432 | add_action( 'wp', array( $this, 'customize_preview_override_404_status' ) ); |
433 | 433 | add_action( 'wp_head', array( $this, 'customize_preview_base' ) ); |
434 | 434 | add_action( 'wp_head', array( $this, 'customize_preview_html5' ) ); |
| 435 | add_action( 'wp_head', array( $this, 'customize_preview_loading_style' ) ); |
435 | 436 | add_action( 'wp_footer', array( $this, 'customize_preview_settings' ), 20 ); |
436 | 437 | add_action( 'shutdown', array( $this, 'customize_preview_signature' ), 1000 ); |
437 | 438 | add_filter( 'wp_die_handler', array( $this, 'remove_preview_signature' ) ); |
… |
… |
final class WP_Customize_Manager { |
491 | 492 | <![endif]--><?php |
492 | 493 | } |
493 | 494 | |
| 495 | public function customize_preview_loading_style() { |
| 496 | ?><style> |
| 497 | body.customizer-navigating-away { |
| 498 | opacity: 0.25; |
| 499 | cursor: progress !important; |
| 500 | } |
| 501 | body.customizer-navigating-away * { |
| 502 | pointer-events: none !important; |
| 503 | } |
| 504 | </style><?php |
| 505 | } |
| 506 | |
494 | 507 | /** |
495 | 508 | * Print JavaScript settings for preview frame. |
496 | 509 | * |
diff --git a/src/wp-includes/js/customize-preview.js b/src/wp-includes/js/customize-preview.js
index 82f7bb8..4020246 100644
a
|
b
|
|
115 | 115 | activeControls: api.settings.activeControls |
116 | 116 | } ); |
117 | 117 | |
| 118 | // Display a loading indicator when user navigate around during preview |
| 119 | api.preview.bind( 'unload', function () { |
| 120 | $( 'body' ).addClass( 'customizer-navigating-away' ); |
| 121 | $( 'html' ).prop( 'title', 'Loading...' ); |
| 122 | }); |
| 123 | |
118 | 124 | /* Custom Backgrounds */ |
119 | 125 | bg = $.map(['color', 'image', 'position_x', 'repeat', 'attachment'], function( prop ) { |
120 | 126 | return 'background_' + prop; |