Make WordPress Core

Changeset 41845


Ignore:
Timestamp:
10/12/2017 05:16:40 AM (8 years ago)
Author:
westonruter
Message:

Customize: Prevent showing confirmation dialog when leaving Customizer after previewing theme switch without making any changes.

Fixes #42173.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/customize-controls.js

    r41839 r41845  
    83858385
    83868386            function isCleanState() {
     8387
     8388                /*
     8389                 * Handle special case of previewing theme switch since some settings (for nav menus and widgets)
     8390                 * are pre-dirty and non-active themes can only ever be auto-drafts.
     8391                 */
     8392                if ( ! api.state( 'activated' ).get() ) {
     8393                    return 0 === api._latestRevision;
     8394                }
     8395
    83878396                return api.state( 'saved' ).get() && 'auto-draft' !== api.state( 'changesetStatus' ).get();
    83888397            }
Note: See TracChangeset for help on using the changeset viewer.