Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#33177 closed defect (bug) (fixed)

Persist expanded states for submenus in Twenty Fifteen when customizing menus

Reported by: westonruter's profile westonruter Owned by: obenland's profile obenland
Milestone: 4.3 Priority: normal
Severity: normal Version: 4.3
Component: Bundled Theme Keywords: has-patch
Focuses: javascript Cc:

Description

If you have a menu with submenus, and you expand a submenu in Twenty Fifteen, then when you make a change to the menu in the Customizer the partial-refresh will kick in and replace the menu container and lose the expanded states. This is a pain especially if you are trying to customize a nested submenus, as you then have to re-expand the nested submenus with each change to the menus in the Customizer.

Attachments (2)

33177.diff (3.8 KB) - added by westonruter 10 years ago.
https://github.com/xwp/wordpress-develop/pull/108
duplicated-toggle-buttons.png (276.7 KB) - added by westonruter 10 years ago.

Download all attachments as: .zip

Change History (8)

#1 @westonruter
10 years ago

  • Component changed from Customize to Themes
  • Keywords has-patch added
  • Owner set to westonruter
  • Status changed from new to accepted

#2 @westonruter
10 years ago

In 33177.diff:

  • Improve naming of param from wpNavArgs to wpNavMenuArgs for customize-preview-menu-refreshed event params.
  • Re-sync expanded states from menu container being replaced
  • Prevents main navigation from being re-initialized multiple times when editing a separate menu assigned to Social Links Menu, causing a toggle button to be newly inserted with each social menu change. See duplicated-toggle-buttons.png.

#3 @westonruter
10 years ago

  • Owner changed from westonruter to obenland
  • Status changed from accepted to assigned

#4 @westonruter
10 years ago

  • Priority changed from low to normal
  • Severity changed from minor to normal

#5 @westonruter
10 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 33491:

Twenty Fifteen: Only re-initialize the main navigation in the Customizer when it is specifically updated.

  • Fix a bug where updating the social menu links would cause the main navigation to get its toggle-expanded buttons duplicated.
  • Persist any existing submenu expanded states on the updated menu.
  • Improve naming of customize-preview-menu-refreshed event param from wpNavArgs to wpNavMenuArgs (old name is retained and marked as deprecated).

Fixes #33177.

#6 @SergeyBiryukov
10 years ago

  • Component changed from Themes to Bundled Theme
Note: See TracTickets for help on using tickets.