Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#35320 closed enhancement (fixed)

Customizer closes when you activate a new theme

Reported by: melchoyce's profile melchoyce Owned by: westonruter's profile westonruter
Milestone: 4.6 Priority: normal
Severity: normal Version: 4.2
Component: Customize Keywords: has-patch commit
Focuses: ui Cc:

Description

When you switch to a new theme in the Customizer and hit "Save and Activate," the Customizer closes.

Steps to reproduce:

  1. Enter the Customizer
  2. Next to Active Theme, click "Change"
  3. Change to a different theme
  4. Click "Save and Activate"
  5. The Customizer closes

What I expect to happen: Since I'm changing my theme from the Customizer, I epxect the Customizer to remain open so I can continue working on my site.

Attachments (1)

35320.diff (1.3 KB) - added by celloexpressions 9 years ago.
Don't auto-close the customizer when a new theme is activated.

Download all attachments as: .zip

Change History (8)

#1 @westonruter
9 years ago

  • Type changed from defect (bug) to enhancement

This functionality was specifically developed for the Customizer:

                /*
                 * When activated, let the loader handle redirecting the page.
                 * If no loader exists, redirect the page ourselves (if a url exists).
                 */
                api.bind( 'activated', function() {
                        if ( parent.targetWindow() )
                                parent.send( 'activated', api.settings.url.activated );
                        else if ( api.settings.url.activated )
                                window.location = api.settings.url.activated;
                });

This has been in place since the Customizer was initially introduced in 3.4. Looking back in the source, I see it was implemented for #20743. The ticket doesn't have much of a rationale for why this behavior was needed.

In any case, I think the current behavior is not a bug but a feature (literally). However, the Customizer may have outlived this feature and it may no longer be applicable.

#2 @celloexpressions
9 years ago

  • Focuses ui added
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Version set to 4.2

I would definitely be in favor of removing this functionality. It assumes that all customization work is complete once a new theme is activated, but in reality additional tweaks may be necessary, and the front end remains visible in the preview. I would argue that the fact that themes can be changed within the Customizer now (since 4.2) makes this old feature become unexpected and jarring. Users have the expectation that they stay in the customizer when they hit the save button, regardless of whether it says "publish" or "activate."

@celloexpressions
9 years ago

Don't auto-close the customizer when a new theme is activated.

#3 @celloexpressions
9 years ago

  • Keywords has-patch added; needs-patch removed

#4 @celloexpressions
9 years ago

  • Milestone changed from Future Release to 4.6

Unless anyone feels strongly that the customizer should close when a new theme is activated, let's get 35320.diff in.

#5 @DrewAPicture
9 years ago

+1 for the Customizer remaining open following activation of a theme.

I've hit this a couple of times myself and always found that experience strangely unlike other save actions in the Customizer.

#6 @celloexpressions
9 years ago

  • Keywords commit added
  • Owner set to westonruter
  • Status changed from new to reviewing

Looks like we don't have any objections based on the current status of the customizer, so let's do it.

#7 @ocean90
9 years ago

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

In 37339:

Customize: Don't auto-close the customizer when a new theme is activated.

Props celloexpressions.
Fixes #35320.

Note: See TracTickets for help on using tickets.