Changes between Version 3 and Version 4 of Ticket #42414
- Timestamp:
- 11/02/2017 05:35:56 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #42414 – Description
v3 v4 1 In 4.9 the [https://github.com/WordPress/wordpress-develop/blob/d6aece2a336225e239798e99f163b30e2e9d8874/src/wp-includes/js/customize-preview.js#L22-L50 injectUrlWithState()] function was amended with a dependency on a `wp.customize.api.settings.changeset.autosave` global. However, `injectUrlWithState` can be called prior to DOM ready when that global is populated, and the result is an undefined error. This can be seen in the Picard theme which does `history.replaceState()` before the Customizer preview is able to initialize itself. So this dependency on the global needs to be removed.1 In 4.9 the [https://github.com/WordPress/wordpress-develop/blob/d6aece2a336225e239798e99f163b30e2e9d8874/src/wp-includes/js/customize-preview.js#L22-L50 injectUrlWithState()] function was amended in [41597] with a dependency on a `wp.customize.api.settings.changeset.autosave` global. However, `injectUrlWithState` can be called prior to DOM ready when that global is populated, and the result is an undefined error. This can be seen in the Picard theme which does `history.replaceState()` before the Customizer preview is able to initialize itself. So this dependency on the global needs to be removed.