WordPress.org

Make WordPress Core

Opened 5 weeks ago

Closed 39 hours ago

#41671 closed defect (bug) (fixed)

Category Widget Navigates Customize Preview out of Customize Preview Context

Reported by: celloexpressions Owned by: westonruter
Milestone: 4.9 Priority: normal
Severity: normal Version: 3.9
Component: Customize Keywords: has-patch commit
Focuses: Cc:

Description

Using the category widget with the display as dropdown mode (which is completely keyboard-inaccessible, although I couldn't find a ticket for that either), changing the cateogry navigates the preview out of the preview, leading to easily nesting customizer iframes via the toolbar navigation that shows up.

Attachments (1)

41671.0.diff (1.4 KB) - added by westonruter 3 weeks ago.

Download all attachments as: .zip

Change History (4)

@westonruter
3 weeks ago

#1 @westonruter
3 weeks ago

  • Keywords has-patch needs-testing added; needs-patch removed
  • Milestone changed from Future Release to 4.9

@celloexpressions you're absolutely right. Now that form submissions are previewable in the Customizer, the simple fix is to just convert the widget to use an actual form. Would you review 41671.0.diff?

#2 @celloexpressions
40 hours ago

  • Keywords commit added; needs-testing removed

There is some weird behavior where setting changes made during page load revert the navigation; however, 41671.0.diff fixes the primary issue. This would benefit from broad testing (in trunk) and possibly a dev-note as the markup change may interfere with some themes/plugins.

#3 @westonruter
39 hours ago

  • Owner set to westonruter
  • Resolution set to fixed
  • Status changed from new to closed

In 41547:

Widgets: Add Customizer preview support to the Category widget when navigating to a category via dropdown.

Switch to using a form that is submitted as opposed to making a direct JavaScript call to change the window.location. This ensures the Customizer is able to inject the customized state into the request.

Fixes #41671.

Note: See TracTickets for help on using tickets.