Changes between Initial Version and Version 3 of Ticket #42414
- Timestamp:
- 11/02/2017 05:34:34 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #42414
- Property Keywords has-patch dev-feedback commit added
- Property Owner set to westonruter
-
Property
Status
changed from
new
toaccepted
-
Ticket #42414 – Description
initial v3 1 In 4.9 the [ Thehttps://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 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.