Customize: Reveal controls pane when clicking on edit shortcuts in mobile preview.
Re-use `paneVisible` state to also manage whether the mobile `preview-only` class is applied to the overlay. Props seancjones. See #36678, #36678, #27403. Fixes #38080. git-svn-id: https://develop.svn.wordpress.org/trunk@39010 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a8b4e3c54b
commit
4b478549d2
@ -5272,6 +5272,7 @@
|
||||
});
|
||||
|
||||
api.state( 'paneVisible' ).bind( function( paneVisible ) {
|
||||
overlay.toggleClass( 'preview-only', ! paneVisible );
|
||||
overlay.toggleClass( 'expanded', paneVisible );
|
||||
overlay.toggleClass( 'collapsed', ! paneVisible );
|
||||
|
||||
@ -5331,7 +5332,7 @@
|
||||
});
|
||||
|
||||
$( '.customize-controls-preview-toggle' ).on( 'click', function() {
|
||||
overlay.toggleClass( 'preview-only' );
|
||||
api.state( 'paneVisible' ).set( ! api.state( 'paneVisible' ).get() );
|
||||
});
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user