WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 5 months ago

#34436 new defect (bug)

Issue with wp.customizer.panel('name').focus().

Reported by: wpweaver Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3.1
Component: Customize Keywords: needs-patch
Focuses: Cc:
PR Number:

Description

This is a small bug (feature?) when using wp.customizer.panel('panel-name').focus().

If you have a Section open (the options being displayed), wp.customizer.panel('parent-of-that-section').focus(); will not switch focus from the section display to the parent panel. Using wp.customizer.panel('any-other-panel').focus(); works.

My new theme interface builds an auxiliary menu to more easily navigate all the panels and sections, and it all works nicely except this case.

I can provide a beta of my theme that demos this if needed. This is likely not really critical, but it does not work as one would expect. This issue manifests in both 4.3.1 and 4.4 beta 1.

Change History (2)

#1 @celloexpressions
3 years ago

  • Keywords needs-patch added

Essentially, the issue here is that focus() doesn't work to move from a section to its parent panel. That should be a case we can fix, if someone can dig into that code.

It sounds like for your use case it may be more appropriate to use section|panel.expand()/collapse() directly. But I think we should be able to add a check to focus out of a section to a parent panel.

#2 @westonruter
3 years ago

  • Milestone changed from Awaiting Review to Future Release
Note: See TracTickets for help on using tickets.