Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#38833 closed defect (bug) (fixed)

Close button does not go to return URL after doing theme switch via customize-loader

Reported by: westonruter Owned by: westonruter
Milestone: 4.7 Priority: normal
Severity: normal Version:
Component: Customize Keywords: has-patch
Focuses: Cc:


  1. Go to the Themes admin page.
  2. Click Live Preview for Twenty Fifteen (or some other).
  3. Open the Themes section and click to Live Preview the Twenty Fourteen theme (or some other).
  4. Click X to close the Customizer.

Bug1: Before clicking X, you'll notice the URL has theme=twentyfiteen even though it should be theme=twentyfourteen.
Bug2: Clicking X takes you back to previewing Twenty Fifteen not taking you back to the return URL (the Themes admin page).

Attachments (1)

38833.0.diff (538 bytes) - added by westonruter 4 years ago.

Download all attachments as: .zip

Change History (4)

4 years ago

#1 @westonruter
4 years ago

  • Keywords has-patch added

The problem is that the customize-loader is still active in the theme witch. The fix is simply to make sure we navigate to the new theme and clear out the customize-loader at the same time by using top.location instead of window.location.

#2 @westonruter
4 years ago

  • Owner set to westonruter
  • Status changed from new to accepted

#3 @westonruter
4 years ago

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

In 39271:

Customize: Ensure Close button actually closes customizer (instead of going back) after switching to a different theme inside a customize-loader iframe.

Fixes #38833.

Note: See TracTickets for help on using tickets.