[wp-trac] [WordPress Trac] #32841: Partial refresh <div> in menu customizer breaks some theme designs
WordPress Trac
noreply at wordpress.org
Mon Jul 6 16:54:45 UTC 2015
#32841: Partial refresh <div> in menu customizer breaks some theme designs
--------------------------+--------------------------
Reporter: greenshady | Owner: westonruter
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 4.3
Component: Customize | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: javascript
--------------------------+--------------------------
Changes (by greenshady):
* keywords: has-patch reporter-feedback => has-patch
Comment:
> I don't think there's anything that Core can do to support this other
than what has already been done. Take a look at [32807] for a change made
to Twenty Fifteen to re-initialize the JS-added behaviors once a menu has
been partially-refreshed. So for your theme to support partial refresh,
you'd need to include the same:
Awesome! Knowing the JS to do that will be helpful. That should be all I
need.
> The question then remains as to whether themes should explicitly say
they support partial-refresh for menus in the Customizer, or if it can be
enabled by default. Up until now it has seemed that the vast majority of
themes work fine with it enabled by default. Thoughts?
I haven't tested with enough themes to know. But, I'd guess enabled by
default would be fine. There should be some docs made available on how to
switch to something different though. I'm guessing this is handled
something like:
{{{
$wp_customize->get_setting( 'the_nav_menu_setting_id' )->transport =
'refresh';
}}}
> BTW, I think the properties on this `params` object may need to be
revisited. Like, in addition to the `wpNavArgs` object it would be handy
to have the actual `container` for the nav menu element that was injected.
I'm not familiar enough with the code to reply to this.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32841#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list