[wp-trac] [WordPress Trac] #36678: Shift-click in Customizer when collapsed does nothing
WordPress Trac
noreply at wordpress.org
Wed Apr 27 00:14:21 UTC 2016
#36678: Shift-click in Customizer when collapsed does nothing
--------------------------+------------------
Reporter: sixhours | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.6
Component: Customize | Version: 3.9
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+------------------
Changes (by westonruter):
* keywords: => needs-patch
* version: trunk => 3.9
* milestone: Awaiting Review => 4.6
Comment:
Great report! When expanding anything, the collapsed state of the entire
panel should be checked and expanded first.
Currently the collapsed state can be checked via `$( '.wp-full-overlay'
).hasClass( 'collapsed' )`, and the logic is handled in `customize-
controls.js`:
{{{#!js
$( '.collapse-sidebar' ).on( 'click', function() {
if ( 'true' === $( this ).attr( 'aria-expanded' ) ) {
$( this ).attr({ 'aria-expanded': 'false', 'aria-label':
api.l10n.expandSidebar });
} else {
$( this ).attr({ 'aria-expanded': 'true', 'aria-label':
api.l10n.collapseSidebar });
}
overlay.toggleClass( 'collapsed' ).toggleClass( 'expanded' );
});
$( '.customize-controls-preview-toggle' ).on( 'click', function() {
overlay.toggleClass( 'preview-only' );
});
}}}
This is bad, however. We need a new `wp.customize.Value()` on
`wp.customize.state` to represent whether the sidebar is collapsed, and
the pane should be expanded/collapsed based on changes to this value, in
the same way that was done with `previewedDevice` and each section/panel's
`expanded` state.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36678#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list