mirror of
https://github.com/WordPress/WordPress.git
synced 2025-04-01 09:26:10 +02:00
Customize: Prevent toggling edit shortcuts when doing shift-click or when clicking on a descendent of an interactive element.
See #38532, #27403. Fixes #38554. Built from https://develop.svn.wordpress.org/trunk@39018 git-svn-id: http://core.svn.wordpress.org/trunk@38960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
328922cc82
commit
ddea523daf
@ -1024,8 +1024,8 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
body.on( 'click', function( event ) {
|
body.on( 'click', function( event ) {
|
||||||
if ( $( event.target ).is( '.customize-partial-edit-shortcut, :input, a[href]' ) || 0 !== $( event.target ).closest( 'a' ).length ) {
|
if ( event.shiftKey || $( event.target ).is( '.customize-partial-edit-shortcut, :input, button *, a[href], a[href] *, object, object *, [tabindex], [tabindex] *' ) ) {
|
||||||
return; // Don't toggle shortcuts on form, link, or link child clicks.
|
return; // Don't toggle shortcuts on shift-clicks or clicks on (or in) interactive elements.
|
||||||
}
|
}
|
||||||
api.selectiveRefresh.editShortcutVisibility.set( 'visible' === api.selectiveRefresh.editShortcutVisibility.get() ? 'hidden' : 'visible' );
|
api.selectiveRefresh.editShortcutVisibility.set( 'visible' === api.selectiveRefresh.editShortcutVisibility.get() ? 'hidden' : 'visible' );
|
||||||
api.preview.send( 'edit-shortcut-visibility', api.selectiveRefresh.editShortcutVisibility.get() );
|
api.preview.send( 'edit-shortcut-visibility', api.selectiveRefresh.editShortcutVisibility.get() );
|
||||||
|
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.7-beta1-39017';
|
$wp_version = '4.7-beta1-39018';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user