Make WordPress Core

Changes between Initial Version and Version 3 of Ticket #42414


Ignore:
Timestamp:
11/02/2017 05:34:34 AM (7 years ago)
Author:
westonruter
Comment:

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 to accepted
  • Ticket #42414 – Description

    initial v3  
    1 In 4.9 the [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.
     1In 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.