Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#37390 closed defect (bug) (fixed)

Twenty Thirteen: masonry widgets layout is not updated in the customizer

Reported by: celloexpressions Owned by: westonruter
Priority: normal Milestone: 4.6
Component: Bundled Theme Version: 4.5
Severity: normal Keywords: has-patch commit has-screenshots
Cc: Focuses: javascript

Description

wp.customize.selectiveRefresh is not defined where the theme's functions.js checks for it, preventing the masonry footer widgets layout from updating properly when widgets are added, deleted, or reordered. This broke sometime between when the change was made to the theme and 4.5.3, and is likely due to the sequence of scripts loading.

See https://wordpress.slack.com/archives/core-customize/p1468779925000003, which has a fix from @westonruter. We also need to update the code in https://make.wordpress.org/core/2016/03/22/implementing-selective-refresh-support-for-widgets/ as themes may still be copying that.

Attachments (3)

37390.0.diff (842 bytes ) - added by westonruter 10 years ago.
37390.1.diff (1.7 KB ) - added by celloexpressions 10 years ago.
Bump script version
37390.after.gif (2.0 MB ) - added by celloexpressions 10 years ago.
Intended functionality resolved.

Change History (7)

@westonruter
10 years ago

#1 @westonruter
10 years ago

  • Keywords has-patch added; needs-patch removed
  • Owner set to westonruter
  • Status newaccepted

@celloexpressions
10 years ago

Bump script version

#2 @celloexpressions
10 years ago

  • Keywords commit added

37390.1.diff looks good to me, with the addition of a version bump on the script to ensure that it isn't cached.

#3 @westonruter
10 years ago

  • Resolutionfixed
  • Status acceptedclosed

In 38083:

Twenty Thirteen: Fix selective refresh of Masonry-laid out widgets by deferring initialization until DOM ready.

This ensures that the wp.customize.selectiveRefresh object will be available when in the Customizer preview.

Fixes #37390.
Props westonruter, celloexpressions.

@celloexpressions
10 years ago

Intended functionality resolved.

#4 @celloexpressions
10 years ago

  • Keywords has-screenshots added
Note: See TracTickets for help on using tickets.